Class CstCallSiteRef
java.lang.Object
com.android.dx.rop.cst.Constant
com.android.dx.rop.cst.CstCallSiteRef
- All Implemented Interfaces:
ToHuman, Comparable<Constant>
Reference to a call site. Each instance of the invoke-custom bytecode uses a unique call site
reference. The call site reference becomes a call site id in the DEX file and multiple call
site id's can refer to the same call site data.
-
Method Summary
Modifier and TypeMethodDescriptionprotected intcompareTo0(Constant other) Compare the values of this and another instance, which are guaranteed to be of the same class.Gets theCstCallSitethat this instance refers to.Gets the prototype of the method handle resolved at the call site.Gets the return type of the method handle resolved at the call site.booleanReturnstrueif this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalseif this instance is category-1.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
-
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
-
typeName
-
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
-
toHuman
Return the "human" string form of this instance. This is generally less "debuggy" thantoString().- Returns:
non-null;the human string form
-
toString
-
getPrototype
Gets the prototype of the method handle resolved at the call site.- Returns:
- the prototype associated with the call site invocation
-
getReturnType
Gets the return type of the method handle resolved at the call site.- Returns:
- the return type associated with the call site invocation
-
getCallSite
Gets theCstCallSitethat this instance refers to.- Returns:
null-ok;the call site associated with this instance
-