Package org.apache.uima.migratev3.jcas
Class UimaDecompiler
java.lang.Object
org.apache.uima.migratev3.jcas.UimaDecompiler
Decompiler
- for testing
- for locating customizations
Operation:
Make an instance, optionally setting
- class loader to use (may pass byte array instead)
- directory where to write output (may output to string instead)
- class loader to use when resolving symbols during decompile
call decompile
- argument
- class name (without .class or .java suffix, fully qualified) or
- byte array
- return value is a byte array output stream with UTF-8 encoded value
decompileToFile - writes decompiled output to a xxx.java file in output directory
Not thread safe
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondecompile
(byte[] b) Decompile from the file system, maybe in a Jar.decompile className, getting the compiled version from the classpathdecompileCommon
(String className) Common part for decompiling to a ByteArrayOutputStream the decompiler settings are set up to get the compiled form by nameboolean
boolean
decompileToOutputDirectory
(String className) decompileToString
(String className) decompile className, getting the compiled version from the classpathdecompileToString
(String className, byte[] byteArray) boolean
writeIfOk
(ByteArrayOutputStream baos, String className)
-
Constructor Details
-
UimaDecompiler
public UimaDecompiler() -
UimaDecompiler
-
-
Method Details
-
decompile
decompile className, getting the compiled version from the classpath- Parameters:
className
- the dotted name of the class- Returns:
- the decompilation
-
decompileCommon
Common part for decompiling to a ByteArrayOutputStream the decompiler settings are set up to get the compiled form by name- Parameters:
className
- the class to decompile- Returns:
- the decompilation
-
decompileToString
decompile className, getting the compiled version from the classpath- Parameters:
className
- the dotted or slashified name of the class- Returns:
- the decompilation
-
decompileToString
-
decompile
Decompile from the file system, maybe in a Jar. This is a 2 pass operation, usually, to get the classname from the decompilation, and then redo the decompilation with that extra bit of configuration.- Parameters:
b
- the byte array representing the compiled file- Returns:
- the decompiled form as a string
-
decompileToOutputDirectory
-
writeIfOk
-
decompiledFailed
-