Interface IDynamicContentManager
public interface IDynamicContentManager
A dynamic content manager is used by
AST output sinks to customize the generated output.-
Method Summary
Modifier and TypeMethodDescriptionfindTypesWithSuperMethods(int methodIndex) Find types that define or inherit a super-method matching a method.generatePackageName(JavaOutputSink out, IJavaType type) Generate the package name for a type.booleangenerateType(JavaOutputSink out, IJavaType type, boolean isFullyQualified, boolean isDefinition, long constructorItemId) Generate a type name.longgetBestVirtualMethodId(int methodIndex, IJavaType actualObjecttype, List<Integer> candidateMethodsIndices) Retrieve the best virtual method item identifier for a call target.getComment(ICodeCoordinates coordinates) Retrieve an inline comment for code coordinates.getDecryptorData(int methodIndex) Retrieve decryptor metadata for a method.getDexType(String csig) Retrieve a dex type by class signature.longgetFieldId(int index) Retrieve the item identifier for a field.getFieldName(int index) Retrieve a field name by index.getFieldSignature(int index) Retrieve a field signature by index.longgetIdentifierId(IdentifierCoordinates coordinates) Retrieve the item identifier for an identifier.getIdentifierName(IdentifierCoordinates coordinates) Retrieve the display name of an identifier.longgetImmediateId(long rawvalue) Retrieve the item identifier for an immediate value.intgetImmediatePreferredBase(long rawvalue) Retrieve the preferred numeric base for an immediate value.longgetImplFieldId(int fieldIndex) Retrieve the implementation item identifier for a field.longgetImplStaticMethodId(int methodIndex) Retrieve the implementation item identifier for a static method.longgetLabelId(ICodeCoordinates coordinates) Retrieve the item identifier for a label.getLabelName(ICodeCoordinates coordinates) Retrieve the display name of a label.longgetMethodId(int index) Retrieve the item identifier for a method.getMethodName(int index) Retrieve a method name by index.getMethodSignature(int index) Retrieve a method signature by index.getPreComment(ICodeCoordinates coordinates) Retrieve a pre-comment for code coordinates.getStringInfo(String constant) Retrieve rendering information for a string constant.booleanisAnonymousClass(IJavaType type) Determine whether a Java type represents an anonymous class.booleanisCollapsed(String addr, String[] areason) Determine whether an address should be rendered collapsed.retrieveImmediateHint(long rawValue) Retrieve a display hint for an immediate value.booleanwasFieldRenamed(int index) Determine whether a field was renamed.booleanwasMethodRenamed(int index) Determine whether a method was renamed.
-
Method Details
-
getDexType
Retrieve a dex type by class signature.- Parameters:
csig- class signature- Returns:
- the dex type, or null if it is unavailable
-
isAnonymousClass
Determine whether a Java type represents an anonymous class.- Parameters:
type- Java type- Returns:
- true if the type is an anonymous class
-
generateType
boolean generateType(JavaOutputSink out, IJavaType type, boolean isFullyQualified, boolean isDefinition, long constructorItemId) Generate a type name.- Parameters:
out- output sinktype- type to generateisFullyQualified- true to generate a fully qualified type nameisDefinition- true if the generated type is a definitionconstructorItemId- identifier to use for a constructor item, or 0- Returns:
- true if the type was generated
-
generatePackageName
Generate the package name for a type.- Parameters:
out- output sinktype- type whose package name should be generated- Returns:
- the generated package name, or null if none was generated
-
getComment
Retrieve an inline comment for code coordinates.- Parameters:
coordinates- code coordinates- Returns:
- the comment text, or null if none is available
-
getPreComment
Retrieve a pre-comment for code coordinates.- Parameters:
coordinates- code coordinates- Returns:
- the comment text, or null if none is available
-
getMethodSignature
Retrieve a method signature by index.- Parameters:
index- method index- Returns:
- the method signature, or null if unavailable
-
getMethodName
Retrieve a method name by index.- Parameters:
index- method index- Returns:
- the method name, or null if unavailable
-
wasMethodRenamed
boolean wasMethodRenamed(int index) Determine whether a method was renamed.- Parameters:
index- method index- Returns:
- true if the method was renamed
-
getMethodId
long getMethodId(int index) Retrieve the item identifier for a method.- Parameters:
index- method index- Returns:
- the method item identifier, or 0 if unavailable
-
getBestVirtualMethodId
long getBestVirtualMethodId(int methodIndex, IJavaType actualObjecttype, List<Integer> candidateMethodsIndices) Retrieve the best virtual method item identifier for a call target.- Parameters:
methodIndex- resolved method indexactualObjecttype- actual receiver typecandidateMethodsIndices- candidate method indices- Returns:
- the selected method item identifier, or 0 if unavailable
-
getImplStaticMethodId
long getImplStaticMethodId(int methodIndex) Retrieve the implementation item identifier for a static method.- Parameters:
methodIndex- method index- Returns:
- the implementation method item identifier, or 0 if unavailable
-
getFieldSignature
Retrieve a field signature by index.- Parameters:
index- field index- Returns:
- the field signature, or null if unavailable
-
getFieldName
Retrieve a field name by index.- Parameters:
index- field index- Returns:
- the field name, or null if unavailable
-
wasFieldRenamed
boolean wasFieldRenamed(int index) Determine whether a field was renamed.- Parameters:
index- field index- Returns:
- true if the field was renamed
-
getFieldId
long getFieldId(int index) Retrieve the item identifier for a field.- Parameters:
index- field index- Returns:
- the field item identifier, or 0 if unavailable
-
getImplFieldId
long getImplFieldId(int fieldIndex) Retrieve the implementation item identifier for a field.- Parameters:
fieldIndex- field index- Returns:
- the implementation field item identifier, or 0 if unavailable
-
getLabelName
Retrieve the display name of a label.- Parameters:
coordinates- label coordinates- Returns:
- the label name, or null if unavailable
-
getLabelId
Retrieve the item identifier for a label.- Parameters:
coordinates- label coordinates- Returns:
- the label item identifier, or 0 if unavailable
-
getIdentifierName
Retrieve the display name of an identifier.- Parameters:
coordinates- identifier coordinates- Returns:
- the identifier name, or null if unavailable
-
getIdentifierId
Retrieve the item identifier for an identifier.- Parameters:
coordinates- identifier coordinates- Returns:
- the identifier item identifier, or 0 if unavailable
-
getStringInfo
Retrieve rendering information for a string constant.- Parameters:
constant- string constant- Returns:
- string rendering information, or null if unavailable
-
getImmediateId
long getImmediateId(long rawvalue) Retrieve the item identifier for an immediate value.- Parameters:
rawvalue- immediate value- Returns:
- the immediate item identifier, or 0 if unavailable
-
getImmediatePreferredBase
int getImmediatePreferredBase(long rawvalue) Retrieve the preferred numeric base for an immediate value.- Parameters:
rawvalue- immediate value- Returns:
- the preferred base, or 0 if the default should be used
-
retrieveImmediateHint
Retrieve a display hint for an immediate value.- Parameters:
rawValue- immediate value- Returns:
- the display hint, or null if unavailable
-
findTypesWithSuperMethods
Find types that define or inherit a super-method matching a method.- Parameters:
methodIndex- method index- Returns:
- matching type signatures
-
getDecryptorData
Retrieve decryptor metadata for a method.- Parameters:
methodIndex- method index- Returns:
- decryptor metadata, or null if unavailable
-
isCollapsed
Determine whether an address should be rendered collapsed.- Parameters:
addr- addressareason- optional single-element output array receiving the collapse reason- Returns:
- true if the address should be collapsed
-