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 int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionGet the item address.getAddress
(boolean effective) Get the item address.int
Get the canonicalized generic flags for that code item.int
getIndex()
Get the item index.long
Get 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.boolean
Determine if the item was part of the original code unit, or was added after processing complete (eg, by a third-party client).boolean
Determine if the item is internal or external.
-
Field Details
-
FLAG_PUBLIC
static final int FLAG_PUBLIC- See Also:
-
FLAG_PRIVATE
static final int FLAG_PRIVATE- See Also:
-
FLAG_PROTECTED
static final int FLAG_PROTECTED- See Also:
-
FLAG_STATIC
static final int FLAG_STATIC- See Also:
-
FLAG_FINAL
static final int FLAG_FINAL- See Also:
-
FLAG_SYNCHRONIZED
static final int FLAG_SYNCHRONIZED- See Also:
-
FLAG_VOLATILE
static final int FLAG_VOLATILE- See Also:
-
FLAG_BRIDGE
static final int FLAG_BRIDGE- See Also:
-
FLAG_TRANSIENT
static final int FLAG_TRANSIENT- See Also:
-
FLAG_VARARGS
static final int FLAG_VARARGS- See Also:
-
FLAG_NATIVE
static final int FLAG_NATIVE- See Also:
-
FLAG_INTERFACE
static final int FLAG_INTERFACE- See Also:
-
FLAG_ABSTRACT
static final int FLAG_ABSTRACT- See Also:
-
FLAG_STRICT
static final int FLAG_STRICT- See Also:
-
FLAG_SYNTHETIC
static final int FLAG_SYNTHETIC- See Also:
-
FLAG_ANNOTATION
static final int FLAG_ANNOTATION- See Also:
-
FLAG_ENUM
static final int FLAG_ENUM- See Also:
-
FLAG_CONSTRUCTOR
static final int FLAG_CONSTRUCTOR- See Also:
-
FLAG_DECLARED_SYNCHRONIZED
static final int FLAG_DECLARED_SYNCHRONIZED- See Also:
-
FLAG_INNER
static final int FLAG_INNER- See Also:
-
FLAG_ANONYMOUS
static final int FLAG_ANONYMOUS- See Also:
-
FLAG_VIRTUAL
static final int FLAG_VIRTUAL- See Also:
-
FLAG_DESTRUCTOR
static final int FLAG_DESTRUCTOR- See Also:
-
FLAG_ARTIFICIAL
static final int FLAG_ARTIFICIAL- See Also:
-
FLAG_INTERNAL
static final int FLAG_INTERNAL- 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
-- 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_INTERNAL
is 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_ARTIFICIAL
is 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
-