66use PHPJava \Core \JVM \Parameters \Runtime ;
77use PHPJava \Core \Stream \Reader \FileReader ;
88use PHPJava \Core \Stream \Reader \ReaderInterface ;
9+ use PHPJava \Kernel \Structures \_Classes ;
910use PHPJava \Packages \java \lang \ClassNotFoundException ;
1011
1112class ClassResolver
@@ -16,6 +17,7 @@ class ClassResolver
1617 const RESOURCE_TYPE_FILE = 'RESOURCE_TYPE_FILE ' ;
1718 const RESOURCE_TYPE_JAR = 'RESOURCE_TYPE_JAR ' ;
1819 const RESOURCE_TYPE_CLASS = 'RESOURCE_TYPE_CLASS ' ;
20+ const RESOURCE_TYPE_INNER_CLASS = 'RESOURCE_TYPE_INNER_CLASS ' ;
1921
2022 // resolved types
2123 const RESOLVED_TYPE_CLASS = 'RESOLVED_TYPE_CLASS ' ;
@@ -42,11 +44,17 @@ public function resolve(string $javaPath, JavaClass $class = null): array
4244 $ relativePath = implode ('/ ' , $ namespaces );
4345 foreach ($ this ->resolves as [$ resourceType , $ value ]) {
4446 switch ($ resourceType ) {
47+ case static ::RESOURCE_TYPE_INNER_CLASS :
48+ // TODO: Implement here
49+ break ;
4550 case static ::RESOURCE_TYPE_FILE :
4651 $ path = realpath ($ value . '/ ' . $ relativePath . '.class ' );
4752 if (($ key = array_search ($ path , $ this ->resolvedPaths , true )) !== false ) {
4853 return $ this ->resolvedPaths [$ key ];
4954 }
55+ /**
56+ * @var JavaClass $initiatedClass
57+ */
5058 if (is_file ($ path )) {
5159 $ initiatedClass = new JavaClass (
5260 new FileReader ($ path ),
@@ -73,7 +81,7 @@ public function resolve(string $javaPath, JavaClass $class = null): array
7381 } catch (ClassNotFoundException $ e ) {
7482 }
7583 break ;
76- case static ::RESOLVED_TYPE_CLASS :
84+ case static ::RESOURCE_TYPE_CLASS :
7785 /**
7886 * @var ReaderInterface $value
7987 */
0 commit comments