File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 88class JavaArchive
99{
1010 const MANIFEST_FILE_NAME = 'META-INF/MANIFEST.MF ' ;
11+ const DEFAULT_ENTRYPOINT_NAME = 'main ' ;
1112
1213 private $ manifestData = [];
1314 private $ jarFile ;
@@ -113,4 +114,19 @@ public function getClassByName(string $name): JavaClass
113114 }
114115 return $ this ->classes [$ name ];
115116 }
117+
118+ private function getEntryPointFinderPath (): array
119+ {
120+ if (strpos ('. ' , $ this ->getEntryPointName ()) === false ) {
121+ return [
122+ [$ this ->getEntryPointName (), static ::DEFAULT_ENTRYPOINT_NAME ],
123+ ];
124+ }
125+ $ splitEntryPoint = explode ('. ' , $ this ->getEntryPointName ());
126+ $ methodOrClassName = array_pop ($ splitEntryPoint );
127+ return [
128+ [implode ('. ' , $ splitEntryPoint ), $ methodOrClassName ],
129+ [$ this ->getEntryPointName (), static ::DEFAULT_ENTRYPOINT_NAME ],
130+ ];
131+ }
116132}
You can’t perform that action at this time.
0 commit comments