Package gw.lang
Class Gosu
java.lang.Object
gw.lang.Gosu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static List<IDirectory>
private static File
private static final LocklessLazyVar<Class<?>>
static final String
static final String
static final String
static final String
static final String
used as a virtual package e.g., for scratchpadstatic final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
private static void
checkArgsLength
(int i, int length) collectArgs
(int i, String[] args) static List<IDirectory>
deriveClasspathFrom
(Class clazz) static List<IDirectory>
deriveClasspathFrom_Java9
(Class clazz) private static String
private static void
findJreSourcePath
(List<String> sources, String archiveName) private static String
findPertinentLines
(IGosuClass gsType, Throwable cause) static List<IDirectory>
static File
static GosuVersion
private static boolean
hasAnnotation
(Method m, String name) private static IMethodInfo
hasStaticMain
(IType type) static void
init()
Initializes Gosu using the classpath derived from the current classloader and system classpath.static void
init
(List<IDirectory> classpath) private static boolean
private static void
static void
private static List<IDirectory>
makeClasspath
(String cpValue, String scriptRoot, boolean cmdLineCP) private static String
private static void
reinitGosu
(List<IDirectory> classpath) private static void
removeDups
(List<IDirectory> classpath) private static void
runNamedOrAnnotatedMethod
(Object instance, String methodName, String annoName) static void
runTest
(IGosuClass gsType) private static void
runWithFile
(File script, List<String> args) private static void
runWithInlineScript
(String script, List<String> args) private static int
runWithType
(String fqn, List<String> args) static void
setClasspath
(List<IDirectory> classpath) static void
setRawArgs
(String[] args) (package private) static void
private static void
-
Field Details
-
BUILTIN_CLASSLOADER
-
NOPACKAGE
used as a virtual package e.g., for scratchpad- See Also:
-
GOSU_SCRATCHPAD_FQN
- See Also:
-
JAR_REPO_DIR
- See Also:
-
JAR_REPO_TXT
- See Also:
-
FAILED
- See Also:
-
SUCCESS
- See Also:
-
_classpath
-
_script
-
_rawArgs
-
-
Constructor Details
-
Gosu
public Gosu()
-
-
Method Details
-
main
-
checkArgsLength
private static void checkArgsLength(int i, int length) -
start
-
launchEditor
- Throws:
Exception
-
collectArgs
-
extractClassPathFromSrc
-
makeClasspath
-
makeFqn
-
setClasspath
-
getClasspath
-
reinitGosu
-
removeDups
-
init
public static void init()Initializes Gosu using the classpath derived from the current classloader and system classpath. -
init
-
bootstrapGosuWhenInitiatedViaClassfile
public static boolean bootstrapGosuWhenInitiatedViaClassfile() -
showHelpAndQuit
static void showHelpAndQuit() -
deriveClasspathFrom
-
deriveClasspathFrom_Java9
-
getVersion
-
getCurrentProgram
-
getRawArgs
-
setRawArgs
-
runWithType
- Throws:
Exception
-
runTest
- Throws:
Exception
-
isTestMethod
- Throws:
Exception
-
runNamedOrAnnotatedMethod
private static void runNamedOrAnnotatedMethod(Object instance, String methodName, String annoName) throws Exception - Throws:
Exception
-
hasAnnotation
- Throws:
Exception
-
hasStaticMain
-
runWithFile
private static void runWithFile(File script, List<String> args) throws IOException, ParseResultsException - Throws:
IOException
ParseResultsException
-
runWithInlineScript
private static void runWithInlineScript(String script, List<String> args) throws IOException, ParseResultsException - Throws:
IOException
ParseResultsException
-
findPertinentLines
-
findJreSources
-
findJreSourcePath
-