Class CstInvokeDynamic
java.lang.Object
com.android.dx.rop.cst.Constant
com.android.dx.rop.cst.CstInvokeDynamic
- All Implemented Interfaces:
ToHuman, Comparable<Constant>
Constants of type
InvokeDynamic. These are present in the class file.-
Method Summary
Modifier and TypeMethodDescriptionCreates aCstCallSiteRefthat refers to this instance.protected intcompareTo0(Constant other) Compare the values of this and another instance, which are guaranteed to be of the same class.intGets the bootstrap method index.Gets the call site associated with this instance.Gets the declaring class of this instance.getNat()Gets theCstNatvalue.Gets thePrototypeof theinvokedynamiccall site.Gets the list of references to this instance.Gets the return type.booleanReturnstrueif this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalseif this instance is category-1.static CstInvokeDynamicMakes an instance for the given value.voidsetCallSite(CstCallSite callSite) Sets the call site associated with this instance.voidsetDeclaringClass(CstType declaringClass) Sets the declaring class of this instance.toHuman()Return the "human" string form of this instance.toString()typeName()Returns the human name for the particular type of constant this instance is.
-
Method Details
-
make
Makes an instance for the given value. This may (but does not necessarily) return an already-allocated instance.- Parameters:
bootstrapMethodIndex- The index of the bootstrap method in the bootstrap method tablenat- the name and type- Returns:
non-null;the appropriate instance
-
addReference
Creates aCstCallSiteRefthat refers to this instance.- Returns:
non-null;a reference to this instance
-
getReferences
Gets the list of references to this instance.- Returns:
non-null;the list of references to this instance
-
toString
-
typeName
-
toHuman
Return the "human" string form of this instance. This is generally less "debuggy" thantoString().- Returns:
non-null;the human string form
-
isCategory2
public boolean isCategory2()Returnstrueif this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalseif this instance is category-1.- Specified by:
isCategory2in classConstant- Returns:
trueiff this instance is category-2
-
compareTo0
Compare the values of this and another instance, which are guaranteed to be of the same class. Subclasses must implement this.- Specified by:
compareTo0in classConstant- Parameters:
other-non-null;the instance to compare to- Returns:
-1,0, or1, as usual for a comparison
-
getBootstrapMethodIndex
public int getBootstrapMethodIndex()Gets the bootstrap method index.- Returns:
- the bootstrap method index
-
getNat
-
getPrototype
Gets thePrototypeof theinvokedynamiccall site.- Returns:
- the
invokedynamiccall site prototype
-
getReturnType
-
setDeclaringClass
Sets the declaring class of this instance. This is a set-once property.- Parameters:
declaringClass-non-null;the declaring class
-
getDeclaringClass
Gets the declaring class of this instance.- Returns:
- the declaring class
-
setCallSite
Sets the call site associated with this instance. This is set-once property.- Parameters:
callSite-non-null;the call site created for this instance
-
getCallSite
Gets the call site associated with this instance.- Returns:
- the call site associated with this instance
-