Class DecompileResult
- java.lang.Object
-
- com.tonic.analysis.source.decompile.DecompileResult
-
public final class DecompileResult extends Object
Decompiled source plus per-method bytecode-offset provenance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDecompileResult.MemberSpanThe 1-based first/last line of a member's full text in the decompiled source - annotations and signature through the closing brace.static classDecompileResult.MethodSpanADecompileResult.MemberSpanfor a method or constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecompileResult.MemberSpangetClassSpan()DecompileResult.MemberSpangetFieldSpan(String fieldName, String fieldDesc)Looks up the text span of one field ingetSource().Map<String,DecompileResult.MemberSpan>getFieldSpans()NavigableMap<Integer,Integer>getLineMap(String methodName, String methodDesc)Looks up the offset-to-line map for one method.Map<String,NavigableMap<Integer,Integer>>getLineMaps()DecompileResult.MethodSpangetMethodSpan(String methodName, String methodDesc)Looks up the text span of one method ingetSource().Map<String,DecompileResult.MethodSpan>getMethodSpans()StringgetSource()
-
-
-
Method Detail
-
getSource
public String getSource()
- Returns:
- the source
-
getLineMaps
public Map<String,NavigableMap<Integer,Integer>> getLineMaps()
- Returns:
- the line maps
-
getMethodSpans
public Map<String,DecompileResult.MethodSpan> getMethodSpans()
- Returns:
- the method spans
-
getFieldSpans
public Map<String,DecompileResult.MemberSpan> getFieldSpans()
- Returns:
- the field spans
-
getClassSpan
public DecompileResult.MemberSpan getClassSpan()
- Returns:
- the class span
-
getLineMap
public NavigableMap<Integer,Integer> getLineMap(String methodName, String methodDesc)
Looks up the offset-to-line map for one method.- Parameters:
methodName- the method namemethodDesc- the method descriptor- Returns:
- the offset-to-line map, or null if the method has no mapped statements
-
getMethodSpan
public DecompileResult.MethodSpan getMethodSpan(String methodName, String methodDesc)
Looks up the text span of one method ingetSource().- Parameters:
methodName- the method namemethodDesc- the method descriptor- Returns:
- the method span, or null if it was not emitted
-
getFieldSpan
public DecompileResult.MemberSpan getFieldSpan(String fieldName, String fieldDesc)
Looks up the text span of one field ingetSource().- Parameters:
fieldName- the field namefieldDesc- the field descriptor- Returns:
- the field span, or null if it was not emitted
-
-