Interface ICodeItem
- All Known Subinterfaces:
IAliasType,IArrayType,IClassType,ICodeClass,ICodeData,ICodeField,ICodeInstruction,ICodeMethod,ICodePackage,ICodePrototype,ICodeString,ICodeType,IDexCallSite,IDexClass,IDexField,IDexItem,IDexMethod,IDexMethodHandle,IDexPackage,IDexString,IDexType,IEnumerationType,INativeClassDataItem,INativeClassItem,INativeContinuousItem,INativeDataItem,INativeFieldItem,INativeInstructionItem,INativeItem,INativeMemoryItem,INativeMethodDataItem,INativeMethodItem,INativeStringItem,INativeType,IPackage,IPrimitiveType,IPrototypeItem,IReferenceType,IStructureType,IWildcardPrototype,IWildcardType
public interface ICodeItem
Definition of a generic code object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAbstract item flag.static final intAnnotation item flag.static final intAnonymous item flag.static final intArtificial item flag.static final intBridge item flag.static final intConstructor item flag.static final intDeclared-synchronized item flag.static final intDestructor item flag.static final intEnumeration item flag.static final intFinal item flag.static final intInner item flag.static final intInterface item flag.static final intInternal item flag.static final intNative item flag.static final intPrivate visibility flag.static final intProtected visibility flag.static final intPublic visibility flag.static final intStatic item flag.static final intStrict item flag.static final intSynchronized item flag.static final intSynthetic item flag.static final intTransient item flag.static final intVarargs item flag.static final intVirtual item flag.static final intVolatile item flag. -
Method Summary
Modifier and TypeMethodDescriptionGet the item address.getAddress(boolean effective) Get the item address.intGet the canonicalized generic flags for that code item.intgetIndex()Get the item index.longGet the item identifier.getName()Get the item name.getName(boolean effective) Get the item simple name.Get the item signature.getSignature(boolean effective) Get the item signature.getSignature(boolean effective, boolean internal) Get the item signature.booleanDetermine if the item was part of the original code unit, or was added after processing complete (eg, by a third-party client).booleanDetermine if the item is internal or external.
-
Field Details
-
FLAG_PUBLIC
static final int FLAG_PUBLICPublic visibility flag.- See Also:
-
FLAG_PRIVATE
static final int FLAG_PRIVATEPrivate visibility flag.- See Also:
-
FLAG_PROTECTED
static final int FLAG_PROTECTEDProtected visibility flag.- See Also:
-
FLAG_STATIC
static final int FLAG_STATICStatic item flag.- See Also:
-
FLAG_FINAL
static final int FLAG_FINALFinal item flag.- See Also:
-
FLAG_SYNCHRONIZED
static final int FLAG_SYNCHRONIZEDSynchronized item flag.- See Also:
-
FLAG_VOLATILE
static final int FLAG_VOLATILEVolatile item flag.- See Also:
-
FLAG_BRIDGE
static final int FLAG_BRIDGEBridge item flag.- See Also:
-
FLAG_TRANSIENT
static final int FLAG_TRANSIENTTransient item flag.- See Also:
-
FLAG_VARARGS
static final int FLAG_VARARGSVarargs item flag.- See Also:
-
FLAG_NATIVE
static final int FLAG_NATIVENative item flag.- See Also:
-
FLAG_INTERFACE
static final int FLAG_INTERFACEInterface item flag.- See Also:
-
FLAG_ABSTRACT
static final int FLAG_ABSTRACTAbstract item flag.- See Also:
-
FLAG_STRICT
static final int FLAG_STRICTStrict item flag.- See Also:
-
FLAG_SYNTHETIC
static final int FLAG_SYNTHETICSynthetic item flag.- See Also:
-
FLAG_ANNOTATION
static final int FLAG_ANNOTATIONAnnotation item flag.- See Also:
-
FLAG_ENUM
static final int FLAG_ENUMEnumeration item flag.- See Also:
-
FLAG_CONSTRUCTOR
static final int FLAG_CONSTRUCTORConstructor item flag.- See Also:
-
FLAG_DECLARED_SYNCHRONIZED
static final int FLAG_DECLARED_SYNCHRONIZEDDeclared-synchronized item flag.- See Also:
-
FLAG_INNER
static final int FLAG_INNERInner item flag.- See Also:
-
FLAG_ANONYMOUS
static final int FLAG_ANONYMOUSAnonymous item flag.- See Also:
-
FLAG_VIRTUAL
static final int FLAG_VIRTUALVirtual item flag.- See Also:
-
FLAG_DESTRUCTOR
static final int FLAG_DESTRUCTORDestructor item flag.- See Also:
-
FLAG_ARTIFICIAL
static final int FLAG_ARTIFICIALArtificial item flag.- See Also:
-
FLAG_INTERNAL
static final int FLAG_INTERNALInternal item flag.- See Also:
-
-
Method Details
-
getItemId
long getItemId()Get the item identifier.- Returns:
- the item identifier
-
getIndex
int getIndex()Get the item index. The meaning of the index is specific to the code unit produced the item.- Returns:
- the item index
-
getAddress
Get the item address.- Parameters:
effective- true to get the effective address- Returns:
- the item address
-
getAddress
String getAddress()Get the item address.- Returns:
- the item address
-
getName
Get the item simple name.If the item is qualified, the non-qualified name should be returned.
- Parameters:
effective- true to get the actual name, false to return the original name (if the unit allows the modification of items)- Returns:
- the name
-
getName
String getName()Get the item name. The effective name is returned.If the item is qualified, the non-qualified name should be returned.
- Returns:
- the effective name
-
getSignature
Get the item signature.- Parameters:
effective- true to get the actual signature, false to return the original signature (if the unit allows the modification of items)- Returns:
- the signature
-
getSignature
Get the item signature.- Parameters:
effective- true to get the actual signature, false to return the original signature (if the unit allows the modification of items)internal- true to generate internal names (default); false to generate user-friendly signatures (may be the same as the internal signatures)- Returns:
- the signature
-
getSignature
String getSignature()Get the item signature. The effective name is returned.- Returns:
- the effective signature
-
isInternal
boolean isInternal()Determine if the item is internal or external. An internal item is defined within its unit, whereas an external item may just be a reference to an item defined in a separate unit.This is a convenience method that checks whether
FLAG_INTERNALis set.- Returns:
- true if the item is internal
-
isArtificial
boolean isArtificial()Determine if the item was part of the original code unit, or was added after processing complete (eg, by a third-party client).This is a convenience method that checks whether
FLAG_ARTIFICIALis set.- Returns:
- true if the item is artificial
-
getGenericFlags
int getGenericFlags()Get the canonicalized generic flags for that code item. Examples include access flags or structural flags.- Returns:
- bit mask of
ICodeItem.FLAG_*values
-