public class ClassSignature
extends java.lang.Object
SignatureVisitor to walk over an incoming signature in order to parse
out our internal tree. This is done so that incoming signatures from mixins
can be merged into the target class.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
OBJECT |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addInterface(org.spongepowered.asm.util.ClassSignature.Token iface)
Add an interface to this signature
|
void |
addInterface(java.lang.String iface)
Add a raw interface declaration to this signature
|
protected void |
addRawInterface(java.lang.String iface)
Add a raw interface which was previously enqueued
|
protected void |
addTypeVar(org.spongepowered.asm.util.ClassSignature.TypeVar typeVar,
org.spongepowered.asm.util.ClassSignature.TokenHandle handle)
Add a type var to this signature, the type var must not exist
|
org.spongepowered.asm.lib.signature.SignatureVisitor |
getRemapper()
Get a remapper for type vars in this signature
|
java.lang.String |
getSuperClass()
Get the raw superclass type of this signature as a string
|
protected org.spongepowered.asm.util.ClassSignature.TokenHandle |
getType(java.lang.String varName)
Get the token for the specified type var name, creating it if necessary
|
protected java.lang.String |
getTypeVar(org.spongepowered.asm.util.ClassSignature.TokenHandle handle)
Get the type var matching the supplied type token, or the raw token type
if no mapping exists for the supplied token handle
|
protected org.spongepowered.asm.util.ClassSignature.TypeVar |
getTypeVar(java.lang.String varName)
Get the type var for the specified var name
|
void |
merge(ClassSignature other)
Merges another class signature into this one.
|
static ClassSignature |
of(org.spongepowered.asm.lib.tree.ClassNode classNode)
Parse a generic class signature from the supplied class node, uses the
declared signature if present, else falls back to generating a raw
signature from the class itself
|
static ClassSignature |
of(java.lang.String signature)
Parse a generic class signature from the supplied string
|
static ClassSignature |
ofLazy(org.spongepowered.asm.lib.tree.ClassNode classNode)
Returns a lazy-evaluated signature object.
|
protected void |
setSuperClass(org.spongepowered.asm.util.ClassSignature.Token superClass)
Set the superclass for this signature
|
java.lang.String |
toString()
Converts this signature into a string representation compatible with the
signature attribute of a Java class
|
ClassSignature |
wake()
Wake up this signature if it is lazy-loaded
|
protected static final java.lang.String OBJECT
protected org.spongepowered.asm.util.ClassSignature.TypeVar getTypeVar(java.lang.String varName)
varName - type var to lookupprotected org.spongepowered.asm.util.ClassSignature.TokenHandle getType(java.lang.String varName)
varName - type var to lookupprotected java.lang.String getTypeVar(org.spongepowered.asm.util.ClassSignature.TokenHandle handle)
handle - type token handle to lookupprotected void addTypeVar(org.spongepowered.asm.util.ClassSignature.TypeVar typeVar,
org.spongepowered.asm.util.ClassSignature.TokenHandle handle)
throws java.lang.IllegalArgumentException
typeVar - type var to addhandle - type var's type tokenjava.lang.IllegalArgumentException - if the specified type var already existsprotected void setSuperClass(org.spongepowered.asm.util.ClassSignature.Token superClass)
superClass - super class to setpublic java.lang.String getSuperClass()
protected void addInterface(org.spongepowered.asm.util.ClassSignature.Token iface)
iface - interface to addpublic void addInterface(java.lang.String iface)
iface - interface name to add (bin format)protected void addRawInterface(java.lang.String iface)
iface - interface to addpublic void merge(ClassSignature other)
other - Class signature to merge into this onepublic org.spongepowered.asm.lib.signature.SignatureVisitor getRemapper()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public ClassSignature wake()
public static ClassSignature of(java.lang.String signature)
signature - signature string to parsepublic static ClassSignature of(org.spongepowered.asm.lib.tree.ClassNode classNode)
classNode - class node to parsepublic static ClassSignature ofLazy(org.spongepowered.asm.lib.tree.ClassNode classNode)
classNode - class node to parse