Package gw.lang
Class Gosu
java.lang.Object
gw.lang.Gosu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static List<IDirectory>private static Fileprivate static final LocklessLazyVar<Class<?>>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringused as a virtual package e.g., for scratchpadstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanprivate static voidcheckArgsLength(int i, int length) collectArgs(int i, String[] args) static List<IDirectory>deriveClasspathFrom(Class clazz) static List<IDirectory>deriveClasspathFrom_Java9(Class clazz) private static Stringprivate static voidfindJreSourcePath(List<String> sources, String archiveName) private static StringfindPertinentLines(IGosuClass gsType, Throwable cause) static List<IDirectory>static Filestatic GosuVersionprivate static booleanhasAnnotation(Method m, String name) private static IMethodInfohasStaticMain(IType type) static voidinit()Initializes Gosu using the classpath derived from the current classloader and system classpath.static voidinit(List<IDirectory> classpath) private static booleanprivate static voidstatic voidprivate static List<IDirectory>makeClasspath(String cpValue, String scriptRoot, boolean cmdLineCP) private static Stringprivate static voidreinitGosu(List<IDirectory> classpath) private static voidremoveDups(List<IDirectory> classpath) private static voidrunNamedOrAnnotatedMethod(Object instance, String methodName, String annoName) static voidrunTest(IGosuClass gsType) private static voidrunWithFile(File script, List<String> args) private static voidrunWithInlineScript(String script, List<String> args) private static intrunWithType(String fqn, List<String> args) static voidsetClasspath(List<IDirectory> classpath) static voidsetRawArgs(String[] args) (package private) static voidprivate 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:
IOExceptionParseResultsException
-
runWithInlineScript
private static void runWithInlineScript(String script, List<String> args) throws IOException, ParseResultsException - Throws:
IOExceptionParseResultsException
-
findPertinentLines
-
findJreSources
-
findJreSourcePath
-