public final class ClassInfo
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ClassInfo.FrameData
Information about frames in a method
|
class |
ClassInfo.InterfaceMethod
A method resolved in an interface via a class, return the member
wrapped so that the implementing class can be retrieved.
|
class |
ClassInfo.Method
A method
|
static class |
ClassInfo.SearchType
Search type for the findInHierarchy methods, replaces a boolean flag
which made calling code difficult to read
|
static class |
ClassInfo.Traversal
To all intents and purposes, the "real" class hierarchy and the mixin
class hierarchy exist in parallel, this means that for some hierarchy
validation operations we need to walk across to the other
hierarchy in order to allow meaningful validation to occur.
|
static class |
ClassInfo.TypeLookup
When using
forType(org.objectweb.asm.Type, org.spongepowered.asm.mixin.transformer.ClassInfo.TypeLookup), determines whether an array type
should be returned as declared (eg. |
| Modifier and Type | Field and Description |
|---|---|
static int |
INCLUDE_ALL |
static int |
INCLUDE_PRIVATE |
static int |
INCLUDE_STATIC |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findField(org.objectweb.asm.tree.FieldInsnNode field,
int flags)
Finds the specified public or protected method in this class
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findField(org.objectweb.asm.tree.FieldNode field)
Finds the specified field in this class
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findField(java.lang.String name,
java.lang.String desc,
int flags)
Finds the specified field in this class
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findFieldInHierarchy(org.objectweb.asm.tree.FieldInsnNode field,
ClassInfo.SearchType searchType)
Finds the specified public or protected field in this class's hierarchy
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findFieldInHierarchy(org.objectweb.asm.tree.FieldInsnNode field,
ClassInfo.SearchType searchType,
int flags)
Finds the specified public or protected field in this class's hierarchy
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findFieldInHierarchy(org.objectweb.asm.tree.FieldNode field,
ClassInfo.SearchType searchType)
Finds the specified private or protected field in this class's hierarchy
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findFieldInHierarchy(org.objectweb.asm.tree.FieldNode field,
ClassInfo.SearchType searchType,
int flags)
Finds the specified private or protected field in this class's hierarchy
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findFieldInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType)
Finds the specified public or protected field in this class's hierarchy
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findFieldInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType,
ClassInfo.Traversal traversal)
Finds the specified public or protected field in this class's hierarchy
|
org.spongepowered.asm.mixin.transformer.ClassInfo.Field |
findFieldInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType,
ClassInfo.Traversal traversal,
int flags)
Finds the specified public or protected field in this class's hierarchy
|
ClassInfo.Method |
findMethod(org.objectweb.asm.tree.MethodInsnNode method)
Finds the specified public or protected method in this class
|
ClassInfo.Method |
findMethod(org.objectweb.asm.tree.MethodInsnNode method,
int flags)
Finds the specified public or protected method in this class
|
ClassInfo.Method |
findMethod(org.objectweb.asm.tree.MethodNode method)
Finds the specified public or protected method in this class
|
ClassInfo.Method |
findMethod(org.objectweb.asm.tree.MethodNode method,
int flags)
Finds the specified public or protected method in this class
|
ClassInfo.Method |
findMethod(java.lang.String name,
java.lang.String desc,
int flags)
Finds the specified public or protected method in this class
|
ClassInfo.Method |
findMethodInHierarchy(org.objectweb.asm.tree.MethodInsnNode method,
ClassInfo.SearchType searchType)
Finds the specified public or protected method in this class's hierarchy
|
ClassInfo.Method |
findMethodInHierarchy(org.objectweb.asm.tree.MethodInsnNode method,
ClassInfo.SearchType searchType,
int flags)
Finds the specified public or protected method in this class's hierarchy
|
ClassInfo.Method |
findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method,
ClassInfo.SearchType searchType)
Finds the specified private or protected method in this class's hierarchy
|
ClassInfo.Method |
findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method,
ClassInfo.SearchType searchType,
ClassInfo.Traversal traversal)
Finds the specified private or protected method in this class's hierarchy
|
ClassInfo.Method |
findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method,
ClassInfo.SearchType searchType,
ClassInfo.Traversal traversal,
int flags)
Finds the specified private or protected method in this class's hierarchy
|
ClassInfo.Method |
findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method,
ClassInfo.SearchType searchType,
int flags)
Finds the specified private or protected method in this class's hierarchy
|
ClassInfo.Method |
findMethodInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType,
ClassInfo.Traversal traversal)
Finds the specified public or protected method in this class's hierarchy
|
ClassInfo.Method |
findMethodInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType,
ClassInfo.Traversal traversal,
int flags)
Finds the specified public or protected method in this class's hierarchy
|
ClassInfo.Method |
findMethodInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType,
int flags)
Finds the specified public or protected method in this class's hierarchy
|
ClassInfo |
findSuperClass(java.lang.String superClass)
Search for the specified superclass in this class's hierarchy.
|
ClassInfo |
findSuperClass(java.lang.String superClass,
ClassInfo.Traversal traversal)
Search for the specified superclass in this class's hierarchy.
|
ClassInfo |
findSuperClass(java.lang.String superClass,
ClassInfo.Traversal traversal,
boolean includeInterfaces)
Search for the specified superclass in this class's hierarchy.
|
static ClassInfo |
forDescriptor(java.lang.String descriptor,
ClassInfo.TypeLookup lookup)
Return a ClassInfo for the specified type descriptor, fetches the
ClassInfo from the cache where possible.
|
static ClassInfo |
forName(java.lang.String className)
Return a ClassInfo for the specified class name, fetches the ClassInfo
from the cache where possible.
|
static ClassInfo |
forType(org.objectweb.asm.Type type,
ClassInfo.TypeLookup lookup)
Return a ClassInfo for the specified class type, fetches the ClassInfo
from the cache where possible and generates the class meta if not.
|
static ClassInfo |
fromCache(java.lang.String className)
Return a ClassInfo for the specified class name, but only if the class
information already exists in the cache.
|
static ClassInfo |
fromCache(org.objectweb.asm.Type type,
ClassInfo.TypeLookup lookup)
Return a ClassInfo for the specified class type, but only if the class
information already exists in the cache.
|
int |
getAccess() |
java.util.Set<IMixinInfo> |
getAppliedMixins()
Get all mixins which have been successfully applied to this class
|
java.lang.String |
getClassName()
Get the class name (java format)
|
static ClassInfo |
getCommonSuperClass(java.lang.String type1,
java.lang.String type2)
ASM logic applied via ClassInfo, returns first common superclass of
classes specified by type1 and type2.
|
static ClassInfo |
getCommonSuperClass(org.objectweb.asm.Type type1,
org.objectweb.asm.Type type2)
ASM logic applied via ClassInfo, returns first common superclass of
classes specified by type1 and type2.
|
static ClassInfo |
getCommonSuperClassOrInterface(ClassInfo type1,
ClassInfo type2)
ASM logic applied via ClassInfo, returns first common superclass or
interface of classes specified by type1 and type2.
|
static ClassInfo |
getCommonSuperClassOrInterface(java.lang.String type1,
java.lang.String type2)
ASM logic applied via ClassInfo, returns first common superclass of
classes specified by type1 and type2.
|
static ClassInfo |
getCommonSuperClassOrInterface(org.objectweb.asm.Type type1,
org.objectweb.asm.Type type2)
ASM logic applied via ClassInfo, returns first common superclass of
classes specified by type1 and type2.
|
java.util.Set<ClassInfo.Method> |
getInterfaceMethods(boolean includeMixins)
If this is an interface, returns a set containing all methods in this
interface and all super interfaces.
|
java.util.Set<java.lang.String> |
getInterfaces()
Returns the answer to life, the universe and everything
|
MethodMapper |
getMethodMapper() |
java.util.Set<ClassInfo.Method> |
getMethods()
Get class/interface methods
|
java.lang.String |
getName()
Get the class name (binary name)
|
ClassInfo |
getOuterClass()
Get the outer class info, can return null if the outer class cannot be
resolved or if this is not an inner class
|
java.lang.String |
getOuterName()
Get the name of the outer class, or null if this is not an inner class
|
ClassSignature |
getSignature()
Return the class signature
|
java.lang.String |
getSimpleName()
Get the class name (simple name, java format)
|
ClassInfo |
getSuperClass()
Get the superclass info, can return null if the superclass cannot be
resolved
|
java.lang.String |
getSuperName()
Get the superclass name (binary name)
|
org.objectweb.asm.Type |
getType()
Get the object type (ASM type)
|
int |
hashCode() |
boolean |
hasMixinInHierarchy()
Find out whether this (mixin) class has another mixin in its superclass
hierarchy.
|
boolean |
hasMixinTargetInHierarchy()
Find out whether this (non-mixin) class has a mixin targetting
any of its superclasses.
|
boolean |
hasSuperClass(ClassInfo superClass)
Test whether this class has the specified superclass in its hierarchy
|
boolean |
hasSuperClass(ClassInfo superClass,
ClassInfo.Traversal traversal)
Test whether this class has the specified superclass in its hierarchy
|
boolean |
hasSuperClass(ClassInfo superClass,
ClassInfo.Traversal traversal,
boolean includeInterfaces)
Test whether this class has the specified superclass in its hierarchy
|
boolean |
hasSuperClass(java.lang.String superClass)
Test whether this class has the specified superclass in its hierarchy
|
boolean |
hasSuperClass(java.lang.String superClass,
ClassInfo.Traversal traversal)
Test whether this class has the specified superclass in its hierarchy
|
boolean |
isAbstract()
Get whether this class has ACC_ABSTRACT
|
boolean |
isInner()
Get whether this class is an inner class
|
boolean |
isInterface()
Get whether this is an interface or not
|
boolean |
isLoadable()
Get whether this class is loadable mixin
|
boolean |
isMixin()
Get whether this class is a mixin
|
boolean |
isProbablyStatic()
Get whether this class is probably static (or is not an inner class)
|
boolean |
isPublic()
Get whether this class has ACC_PUBLIC
|
boolean |
isSynthetic()
Get whether this class has ACC_SYNTHETIC
|
java.lang.String |
toString() |
public static final int INCLUDE_PRIVATE
public static final int INCLUDE_STATIC
public static final int INCLUDE_ALL
public java.util.Set<IMixinInfo> getAppliedMixins()
public boolean isMixin()
public boolean isLoadable()
public boolean isPublic()
public boolean isAbstract()
public boolean isSynthetic()
public boolean isProbablyStatic()
public boolean isInner()
public boolean isInterface()
public java.util.Set<java.lang.String> getInterfaces()
public java.lang.String toString()
toString in class java.lang.Objectpublic MethodMapper getMethodMapper()
public int getAccess()
public java.lang.String getName()
public java.lang.String getClassName()
public java.lang.String getSimpleName()
public org.objectweb.asm.Type getType()
public java.lang.String getSuperName()
public ClassInfo getSuperClass()
public java.lang.String getOuterName()
public ClassInfo getOuterClass()
public ClassSignature getSignature()
ClassSignature instancepublic java.util.Set<ClassInfo.Method> getMethods()
public java.util.Set<ClassInfo.Method> getInterfaceMethods(boolean includeMixins)
includeMixins - Whether to include methods from mixins targeting
this class infopublic boolean hasSuperClass(java.lang.String superClass)
superClass - Name of the superclass to search for in the hierarchypublic boolean hasSuperClass(java.lang.String superClass,
ClassInfo.Traversal traversal)
superClass - Name of the superclass to search for in the hierarchytraversal - Traversal type to allow during this lookuppublic boolean hasSuperClass(ClassInfo superClass)
superClass - Superclass to search for in the hierarchypublic boolean hasSuperClass(ClassInfo superClass, ClassInfo.Traversal traversal)
superClass - Superclass to search for in the hierarchytraversal - Traversal type to allow during this lookuppublic boolean hasSuperClass(ClassInfo superClass, ClassInfo.Traversal traversal, boolean includeInterfaces)
superClass - Superclass to search for in the hierarchytraversal - Traversal type to allow during this lookupincludeInterfaces - True to include interfaces in the lookuppublic ClassInfo findSuperClass(java.lang.String superClass)
superClass - Superclass name to search forpublic ClassInfo findSuperClass(java.lang.String superClass, ClassInfo.Traversal traversal)
superClass - Superclass name to search fortraversal - Traversal type to allow during this lookuppublic ClassInfo findSuperClass(java.lang.String superClass, ClassInfo.Traversal traversal, boolean includeInterfaces)
superClass - Superclass name to search fortraversal - Traversal type to allow during this lookupincludeInterfaces - True to include interfaces in the lookuppublic boolean hasMixinInHierarchy()
public boolean hasMixinTargetInHierarchy()
public ClassInfo.Method findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method, ClassInfo.SearchType searchType)
method - Method to search forsearchType - Search strategy to usepublic ClassInfo.Method findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal)
method - Method to search forsearchType - Search strategy to usetraversal - Traversal type to allow during this lookuppublic ClassInfo.Method findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method, ClassInfo.SearchType searchType, int flags)
method - Method to search forsearchType - Search strategy to useflags - search flagspublic ClassInfo.Method findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal, int flags)
method - Method to search forsearchType - Search strategy to usetraversal - Traversal type to allow during this lookupflags - search flagspublic ClassInfo.Method findMethodInHierarchy(org.objectweb.asm.tree.MethodInsnNode method, ClassInfo.SearchType searchType)
method - Method to search forsearchType - Search strategy to usepublic ClassInfo.Method findMethodInHierarchy(org.objectweb.asm.tree.MethodInsnNode method, ClassInfo.SearchType searchType, int flags)
method - Method to search forsearchType - Search strategy to useflags - search flagspublic ClassInfo.Method findMethodInHierarchy(java.lang.String name, java.lang.String desc, ClassInfo.SearchType searchType, int flags)
name - Method name to search fordesc - Method descriptorsearchType - Search strategy to useflags - search flagspublic ClassInfo.Method findMethodInHierarchy(java.lang.String name, java.lang.String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal)
name - Method name to search fordesc - Method descriptorsearchType - Search strategy to usetraversal - Traversal type to allow during this lookuppublic ClassInfo.Method findMethodInHierarchy(java.lang.String name, java.lang.String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal, int flags)
name - Method name to search fordesc - Method descriptorsearchType - Search strategy to usetraversal - Traversal type to allow during this lookupflags - search flagspublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findFieldInHierarchy(org.objectweb.asm.tree.FieldNode field,
ClassInfo.SearchType searchType)
field - Field to search forsearchType - Search strategy to usepublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findFieldInHierarchy(org.objectweb.asm.tree.FieldNode field,
ClassInfo.SearchType searchType,
int flags)
field - Field to search forsearchType - Search strategy to useflags - search flagspublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findFieldInHierarchy(org.objectweb.asm.tree.FieldInsnNode field,
ClassInfo.SearchType searchType)
field - Field to search forsearchType - Search strategy to usepublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findFieldInHierarchy(org.objectweb.asm.tree.FieldInsnNode field,
ClassInfo.SearchType searchType,
int flags)
field - Field to search forsearchType - Search strategy to useflags - search flagspublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findFieldInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType)
name - Field name to search fordesc - Field descriptorsearchType - Search strategy to usepublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findFieldInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType,
ClassInfo.Traversal traversal)
name - Field name to search fordesc - Field descriptorsearchType - Search strategy to usetraversal - Traversal type to allow during this lookuppublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findFieldInHierarchy(java.lang.String name,
java.lang.String desc,
ClassInfo.SearchType searchType,
ClassInfo.Traversal traversal,
int flags)
name - Field name to search fordesc - Field descriptorsearchType - Search strategy to usetraversal - Traversal type to allow during this lookupflags - search flagspublic ClassInfo.Method findMethod(org.objectweb.asm.tree.MethodNode method)
method - Method to search forpublic ClassInfo.Method findMethod(org.objectweb.asm.tree.MethodNode method, int flags)
method - Method to search forflags - search flagspublic ClassInfo.Method findMethod(org.objectweb.asm.tree.MethodInsnNode method)
method - Method to search forpublic ClassInfo.Method findMethod(org.objectweb.asm.tree.MethodInsnNode method, int flags)
method - Method to search forflags - search flagspublic ClassInfo.Method findMethod(java.lang.String name, java.lang.String desc, int flags)
name - Method name to search fordesc - Method signature to search forflags - search flagspublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findField(org.objectweb.asm.tree.FieldNode field)
field - Field to search forpublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findField(org.objectweb.asm.tree.FieldInsnNode field,
int flags)
field - Field to search forflags - search flagspublic org.spongepowered.asm.mixin.transformer.ClassInfo.Field findField(java.lang.String name,
java.lang.String desc,
int flags)
name - Field name to search fordesc - Field signature to search forflags - search flagspublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static ClassInfo forName(java.lang.String className)
className - Binary name of the class to look uppublic static ClassInfo forDescriptor(java.lang.String descriptor, ClassInfo.TypeLookup lookup)
descriptor - Internal descriptor of the type to inspectlookup - Lookup type to use (literal/element)public static ClassInfo forType(org.objectweb.asm.Type type, ClassInfo.TypeLookup lookup)
type - Type to look uplookup - Lookup type to use (literal/element)public static ClassInfo fromCache(java.lang.String className)
className - Binary name of the class to look uppublic static ClassInfo fromCache(org.objectweb.asm.Type type, ClassInfo.TypeLookup lookup)
type - Type to look uplookup - Lookup type to use (literal/element)public static ClassInfo getCommonSuperClass(java.lang.String type1, java.lang.String type2)
type1 - First typetype2 - Second typepublic static ClassInfo getCommonSuperClass(org.objectweb.asm.Type type1, org.objectweb.asm.Type type2)
type1 - First typetype2 - Second typepublic static ClassInfo getCommonSuperClassOrInterface(java.lang.String type1, java.lang.String type2)
type1 - First typetype2 - Second typepublic static ClassInfo getCommonSuperClassOrInterface(org.objectweb.asm.Type type1, org.objectweb.asm.Type type2)
type1 - First typetype2 - Second typepublic static ClassInfo getCommonSuperClassOrInterface(ClassInfo type1, ClassInfo type2)
type1 - First typetype2 - Second type