Class ClassInfo
java.lang.Object
org.spongepowered.asm.mixin.transformer.ClassInfo
Information about a class, used as a way of keeping track of class hierarchy
information needed to support more complex mixin behaviour such as detached
superclass and mixin inheritance.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
A fieldstatic class
Information about frames in a methodclass
A method resolved in an interface via a class, return the member wrapped so that the implementing class can be retrieved.class
A methodstatic enum
Search type for the findInHierarchy methods, replaces a boolean flag which made calling code difficult to readstatic enum
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 enum
When usingClassInfo.forType
, determines whether an array type should be returned as declared (eg. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Include private and static members when running a member searchstatic final int
Include instance and class initialisers when running a method searchstatic final int
Include private members when running a member searchstatic final int
Include static members when running a member search -
Method Summary
Modifier and TypeMethodDescriptionboolean
Finds the specified field in this classfindField
(org.objectweb.asm.tree.FieldInsnNode field, int flags) Finds the specified public or protected method in this classfindField
(org.objectweb.asm.tree.FieldNode field) Finds the specified field in this classfindFieldInHierarchy
(String name, String desc, ClassInfo.SearchType searchType) Finds the specified public or protected field in this class's hierarchyfindFieldInHierarchy
(String name, String desc, ClassInfo.SearchType searchType, int flags) Finds the specified public or protected field in this class's hierarchyfindFieldInHierarchy
(String name, String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal) Finds the specified public or protected field in this class's hierarchyfindFieldInHierarchy
(String name, String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal, int flags) Finds the specified public or protected field in this class's hierarchyfindFieldInHierarchy
(org.objectweb.asm.tree.FieldInsnNode field, ClassInfo.SearchType searchType) Finds the specified public or protected field in this class's hierarchyfindFieldInHierarchy
(org.objectweb.asm.tree.FieldInsnNode field, ClassInfo.SearchType searchType, int flags) Finds the specified public or protected field in this class's hierarchyfindFieldInHierarchy
(org.objectweb.asm.tree.FieldNode field, ClassInfo.SearchType searchType) Finds the specified private or protected field in this class's hierarchyfindFieldInHierarchy
(org.objectweb.asm.tree.FieldNode field, ClassInfo.SearchType searchType, int flags) Finds the specified private or protected field in this class's hierarchyfindMethod
(String name, String desc, int flags) Finds the specified public or protected method in this classfindMethod
(org.objectweb.asm.tree.MethodInsnNode method) Finds the specified public or protected method in this classfindMethod
(org.objectweb.asm.tree.MethodInsnNode method, int flags) Finds the specified public or protected method in this classfindMethod
(org.objectweb.asm.tree.MethodNode method) Finds the specified public or protected method in this classfindMethod
(org.objectweb.asm.tree.MethodNode method, int flags) Finds the specified public or protected method in this classfindMethodInHierarchy
(String name, String desc, ClassInfo.SearchType searchType, int flags) Finds the specified public or protected method in this class's hierarchyfindMethodInHierarchy
(String name, String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal) Finds the specified public or protected method in this class's hierarchyfindMethodInHierarchy
(String name, String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal, int flags) Finds the specified public or protected method in this class's hierarchyfindMethodInHierarchy
(org.objectweb.asm.tree.MethodInsnNode method, ClassInfo.SearchType searchType) Finds the specified public or protected method in this class's hierarchyfindMethodInHierarchy
(org.objectweb.asm.tree.MethodInsnNode method, ClassInfo.SearchType searchType, int flags) Finds the specified public or protected method in this class's hierarchyfindMethodInHierarchy
(org.objectweb.asm.tree.MethodNode method, ClassInfo.SearchType searchType) Finds the specified private or protected method in this class's hierarchyfindMethodInHierarchy
(org.objectweb.asm.tree.MethodNode method, ClassInfo.SearchType searchType, int flags) Finds the specified private or protected method in this class's hierarchyfindMethodInHierarchy
(org.objectweb.asm.tree.MethodNode method, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal) Finds the specified private or protected method in this class's hierarchyfindMethodInHierarchy
(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 hierarchyfindSuperClass
(String superClass) Search for the specified superclass in this class's hierarchy.findSuperClass
(String superClass, ClassInfo.Traversal traversal) Search for the specified superclass in this class's hierarchy.findSuperClass
(String superClass, ClassInfo.Traversal traversal, boolean includeInterfaces) Search for the specified superclass in this class's hierarchy.static ClassInfo
forDescriptor
(String descriptor, ClassInfo.TypeLookup lookup) Return a ClassInfo for the specified type descriptor, fetches the ClassInfo from the cache where possible.static ClassInfo
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
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
Get all mixins which have been successfully applied to this classGet the class name (java format)static ClassInfo
getCommonSuperClass
(String type1, 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
(String type1, 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.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.getInterfaceMethods
(boolean includeMixins) If this is an interface, returns a set containing all methods in this interface and all super interfaces.Returns the answer to life, the universe and everythingGet class/interface methodsgetName()
Get the class name (binary name)Return the nest host declared in the classGet nest members declared in the classGet the outer class info, can return null if the outer class cannot be resolved or if this is not an inner classGet the name of the outer class, or null if this is not an inner classReturn the class signatureGet the class name (simple name, java format)Get the superclass info, can return null if the superclass cannot be resolvedGet the superclass name (binary name)org.objectweb.asm.Type
getType()
Get the object type (ASM type)int
hashCode()
boolean
Find out whether this (mixin) class has another mixin in its superclass hierarchy.boolean
Find out whether this (non-mixin) class has a mixin targetting any of its superclasses.boolean
hasSuperClass
(Class<?> superClass) Test whether this class has the specified superclass in its hierarchyboolean
hasSuperClass
(Class<?> superClass, ClassInfo.Traversal traversal) Test whether this class has the specified superclass in its hierarchyboolean
hasSuperClass
(Class<?> superClass, ClassInfo.Traversal traversal, boolean includeInterfaces) Test whether this class has the specified superclass in its hierarchyboolean
hasSuperClass
(String superClass) Test whether this class has the specified superclass in its hierarchyboolean
hasSuperClass
(String superClass, ClassInfo.Traversal traversal) Test whether this class has the specified superclass in its hierarchyboolean
hasSuperClass
(String superClass, ClassInfo.Traversal traversal, boolean includeInterfaces) Test whether this class has the specified superclass in its hierarchyboolean
hasSuperClass
(ClassInfo superClass) Test whether this class has the specified superclass in its hierarchyboolean
hasSuperClass
(ClassInfo superClass, ClassInfo.Traversal traversal) Test whether this class has the specified superclass in its hierarchyboolean
hasSuperClass
(ClassInfo superClass, ClassInfo.Traversal traversal, boolean includeInterfaces) Test whether this class has the specified superclass in its hierarchyboolean
Get whether this class has ACC_ABSTRACTboolean
isInner()
Get whether this class is an inner classboolean
Get whether this is an interface or notboolean
Get whether this class is loadable mixinboolean
isMixin()
Get whether this class is a mixinboolean
Get whether this class has ACC_PRIVATE (only valid for inner classes)boolean
Get whether this class is probably static (or is not an inner class)boolean
Get whether this class has ACC_PROTECTED (only valid for inner classes)boolean
isPublic()
Get whether this class has ACC_PUBLICboolean
Get whether this class is really public (only valid for inner classes which may be "public" themselves but aren't actually visible because their enclosing type is package-private for example.boolean
Get whether this class has ACC_SYNTHETICResolve the nest host for inner classes of this class.toString()
-
Field Details
-
INCLUDE_PRIVATE
public static final int INCLUDE_PRIVATEInclude private members when running a member search- See Also:
-
INCLUDE_STATIC
public static final int INCLUDE_STATICInclude static members when running a member search- See Also:
-
INCLUDE_ALL
public static final int INCLUDE_ALLInclude private and static members when running a member search- See Also:
-
INCLUDE_INITIALISERS
public static final int INCLUDE_INITIALISERSInclude instance and class initialisers when running a method search- See Also:
-
-
Method Details
-
getAppliedMixins
Get all mixins which have been successfully applied to this class -
isMixin
public boolean isMixin()Get whether this class is a mixin -
isLoadable
public boolean isLoadable()Get whether this class is loadable mixin -
isPublic
public boolean isPublic()Get whether this class has ACC_PUBLIC -
isReallyPublic
public boolean isReallyPublic()Get whether this class is really public (only valid for inner classes which may be "public" themselves but aren't actually visible because their enclosing type is package-private for example. -
isProtected
public boolean isProtected()Get whether this class has ACC_PROTECTED (only valid for inner classes) -
isPrivate
public boolean isPrivate()Get whether this class has ACC_PRIVATE (only valid for inner classes) -
isAbstract
public boolean isAbstract()Get whether this class has ACC_ABSTRACT -
isSynthetic
public boolean isSynthetic()Get whether this class has ACC_SYNTHETIC -
isProbablyStatic
public boolean isProbablyStatic()Get whether this class is probably static (or is not an inner class) -
isInner
public boolean isInner()Get whether this class is an inner class -
isInterface
public boolean isInterface()Get whether this is an interface or not -
getInterfaces
Returns the answer to life, the universe and everything -
toString
-
getAccess
public int getAccess() -
getName
Get the class name (binary name) -
getClassName
Get the class name (java format) -
getSimpleName
Get the class name (simple name, java format) -
getType
public org.objectweb.asm.Type getType()Get the object type (ASM type) -
getSuperName
Get the superclass name (binary name) -
getSuperClass
Get the superclass info, can return null if the superclass cannot be resolved -
getOuterName
Get the name of the outer class, or null if this is not an inner class -
getOuterClass
Get the outer class info, can return null if the outer class cannot be resolved or if this is not an inner class -
getSignature
Return the class signature- Returns:
- signature as a
ClassSignature
instance
-
getNestHost
Return the nest host declared in the class -
getNestMembers
Get nest members declared in the class -
resolveNestHost
Resolve the nest host for inner classes of this class. If the class itself has a nest host, the host is returned so that members can be added to it. If the class itself is a nest host (already has nest members) or is neither a nest host or member (eg. per the specification is already a nest host with itself as the sole member) then this method simply returns this ClassInfo. -
getMethods
Get class/interface methods- Returns:
- read-only view of class methods
-
getInterfaceMethods
If this is an interface, returns a set containing all methods in this interface and all super interfaces. If this is a class, returns a set containing all methods for all interfaces implemented by this class and all super interfaces of those interfaces.- Parameters:
includeMixins
- Whether to include methods from mixins targeting this class info- Returns:
- read-only view of class methods
-
hasSuperClass
Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Superclass to search for in the hierarchy- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
hasSuperClass
Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Superclass to search for in the hierarchytraversal
- Traversal type to allow during this lookup- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
hasSuperClass
public boolean hasSuperClass(Class<?> superClass, ClassInfo.Traversal traversal, boolean includeInterfaces) Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Superclass to search for in the hierarchytraversal
- Traversal type to allow during this lookupincludeInterfaces
- True to include interfaces in the lookup- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
hasSuperClass
Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Name of the superclass to search for in the hierarchy- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
hasSuperClass
Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Name of the superclass to search for in the hierarchytraversal
- Traversal type to allow during this lookup- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
hasSuperClass
public boolean hasSuperClass(String superClass, ClassInfo.Traversal traversal, boolean includeInterfaces) Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Name of the superclass to search for in the hierarchytraversal
- Traversal type to allow during this lookupincludeInterfaces
- True to include interfaces in the lookup- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
hasSuperClass
Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Superclass to search for in the hierarchy- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
hasSuperClass
Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Superclass to search for in the hierarchytraversal
- Traversal type to allow during this lookup- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
hasSuperClass
public boolean hasSuperClass(ClassInfo superClass, ClassInfo.Traversal traversal, boolean includeInterfaces) Test whether this class has the specified superclass in its hierarchy- Parameters:
superClass
- Superclass to search for in the hierarchytraversal
- Traversal type to allow during this lookupincludeInterfaces
- True to include interfaces in the lookup- Returns:
- true if the specified class appears in the class's hierarchy anywhere
-
findSuperClass
Search for the specified superclass in this class's hierarchy. If found returns the ClassInfo, otherwise returns null- Parameters:
superClass
- Superclass name to search for- Returns:
- Matched superclass or null if not found
-
findSuperClass
Search for the specified superclass in this class's hierarchy. If found returns the ClassInfo, otherwise returns null- Parameters:
superClass
- Superclass name to search fortraversal
- Traversal type to allow during this lookup- Returns:
- Matched superclass or null if not found
-
findSuperClass
public ClassInfo findSuperClass(String superClass, ClassInfo.Traversal traversal, boolean includeInterfaces) Search for the specified superclass in this class's hierarchy. If found returns the ClassInfo, otherwise returns null- Parameters:
superClass
- Superclass name to search fortraversal
- Traversal type to allow during this lookupincludeInterfaces
- True to include interfaces in the lookup- Returns:
- Matched superclass or null if not found
-
hasMixinInHierarchy
public boolean hasMixinInHierarchy()Find out whether this (mixin) class has another mixin in its superclass hierarchy. This method always returns false for non-mixin classes.- Returns:
- true if and only if one or more mixins are found in the hierarchy of this mixin
-
hasMixinTargetInHierarchy
public boolean hasMixinTargetInHierarchy()Find out whether this (non-mixin) class has a mixin targetting any of its superclasses. This method always returns false for mixin classes.- Returns:
- true if and only if one or more classes in this class's hierarchy are targetted by a mixin
-
findMethodInHierarchy
public ClassInfo.Method findMethodInHierarchy(org.objectweb.asm.tree.MethodNode method, ClassInfo.SearchType searchType) Finds the specified private or protected method in this class's hierarchy- Parameters:
method
- Method to search forsearchType
- Search strategy to use- Returns:
- the method object or null if the method could not be resolved
-
findMethodInHierarchy
public 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- Parameters:
method
- Method to search forsearchType
- Search strategy to usetraversal
- Traversal type to allow during this lookup- Returns:
- the method object or null if the method could not be resolved
-
findMethodInHierarchy
public 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- Parameters:
method
- Method to search forsearchType
- Search strategy to useflags
- search flags- Returns:
- the method object or null if the method could not be resolved
-
findMethodInHierarchy
public 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- Parameters:
method
- Method to search forsearchType
- Search strategy to usetraversal
- Traversal type to allow during this lookupflags
- search flags- Returns:
- the method object or null if the method could not be resolved
-
findMethodInHierarchy
public ClassInfo.Method findMethodInHierarchy(org.objectweb.asm.tree.MethodInsnNode method, ClassInfo.SearchType searchType) Finds the specified public or protected method in this class's hierarchy- Parameters:
method
- Method to search forsearchType
- Search strategy to use- Returns:
- the method object or null if the method could not be resolved
-
findMethodInHierarchy
public 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- Parameters:
method
- Method to search forsearchType
- Search strategy to useflags
- search flags- Returns:
- the method object or null if the method could not be resolved
-
findMethodInHierarchy
public ClassInfo.Method findMethodInHierarchy(String name, String desc, ClassInfo.SearchType searchType, int flags) Finds the specified public or protected method in this class's hierarchy- Parameters:
name
- Method name to search fordesc
- Method descriptorsearchType
- Search strategy to useflags
- search flags- Returns:
- the method object or null if the method could not be resolved
-
findMethodInHierarchy
public ClassInfo.Method findMethodInHierarchy(String name, String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal) Finds the specified public or protected method in this class's hierarchy- Parameters:
name
- Method name to search fordesc
- Method descriptorsearchType
- Search strategy to usetraversal
- Traversal type to allow during this lookup- Returns:
- the method object or null if the method could not be resolved
-
findMethodInHierarchy
public ClassInfo.Method findMethodInHierarchy(String name, String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal, int flags) Finds the specified public or protected method in this class's hierarchy- Parameters:
name
- Method name to search fordesc
- Method descriptorsearchType
- Search strategy to usetraversal
- Traversal type to allow during this lookupflags
- search flags- Returns:
- the method object or null if the method could not be resolved
-
findFieldInHierarchy
public ClassInfo.Field findFieldInHierarchy(org.objectweb.asm.tree.FieldNode field, ClassInfo.SearchType searchType) Finds the specified private or protected field in this class's hierarchy- Parameters:
field
- Field to search forsearchType
- Search strategy to use- Returns:
- the field object or null if the field could not be resolved
-
findFieldInHierarchy
public 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- Parameters:
field
- Field to search forsearchType
- Search strategy to useflags
- search flags- Returns:
- the field object or null if the field could not be resolved
-
findFieldInHierarchy
public ClassInfo.Field findFieldInHierarchy(org.objectweb.asm.tree.FieldInsnNode field, ClassInfo.SearchType searchType) Finds the specified public or protected field in this class's hierarchy- Parameters:
field
- Field to search forsearchType
- Search strategy to use- Returns:
- the field object or null if the field could not be resolved
-
findFieldInHierarchy
public 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- Parameters:
field
- Field to search forsearchType
- Search strategy to useflags
- search flags- Returns:
- the field object or null if the field could not be resolved
-
findFieldInHierarchy
public ClassInfo.Field findFieldInHierarchy(String name, String desc, ClassInfo.SearchType searchType) Finds the specified public or protected field in this class's hierarchy- Parameters:
name
- Field name to search fordesc
- Field descriptorsearchType
- Search strategy to use- Returns:
- the field object or null if the field could not be resolved
-
findFieldInHierarchy
public ClassInfo.Field findFieldInHierarchy(String name, String desc, ClassInfo.SearchType searchType, int flags) Finds the specified public or protected field in this class's hierarchy- Parameters:
name
- Field name to search fordesc
- Field descriptorsearchType
- Search strategy to useflags
- search flags- Returns:
- the field object or null if the field could not be resolved
-
findFieldInHierarchy
public ClassInfo.Field findFieldInHierarchy(String name, String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal) Finds the specified public or protected field in this class's hierarchy- Parameters:
name
- Field name to search fordesc
- Field descriptorsearchType
- Search strategy to usetraversal
- Traversal type to allow during this lookup- Returns:
- the field object or null if the field could not be resolved
-
findFieldInHierarchy
public ClassInfo.Field findFieldInHierarchy(String name, String desc, ClassInfo.SearchType searchType, ClassInfo.Traversal traversal, int flags) Finds the specified public or protected field in this class's hierarchy- Parameters:
name
- Field name to search fordesc
- Field descriptorsearchType
- Search strategy to usetraversal
- Traversal type to allow during this lookupflags
- search flags- Returns:
- the field object or null if the field could not be resolved
-
findMethod
Finds the specified public or protected method in this class- Parameters:
method
- Method to search for- Returns:
- the method object or null if the method could not be resolved
-
findMethod
Finds the specified public or protected method in this class- Parameters:
method
- Method to search forflags
- search flags- Returns:
- the method object or null if the method could not be resolved
-
findMethod
Finds the specified public or protected method in this class- Parameters:
method
- Method to search for- Returns:
- the method object or null if the method could not be resolved
-
findMethod
Finds the specified public or protected method in this class- Parameters:
method
- Method to search forflags
- search flags- Returns:
- the method object or null if the method could not be resolved
-
findMethod
Finds the specified public or protected method in this class- Parameters:
name
- Method name to search fordesc
- Method signature to search forflags
- search flags- Returns:
- the method object or null if the method could not be resolved
-
findField
Finds the specified field in this class- Parameters:
field
- Field to search for- Returns:
- the field object or null if the field could not be resolved
-
findField
Finds the specified public or protected method in this class- Parameters:
field
- Field to search forflags
- search flags- Returns:
- the field object or null if the field could not be resolved
-
findField
Finds the specified field in this class- Parameters:
name
- Field name to search fordesc
- Field signature to search forflags
- search flags- Returns:
- the field object or null if the field could not be resolved
-
equals
-
hashCode
public int hashCode() -
forName
Return a ClassInfo for the specified class name, fetches the ClassInfo from the cache where possible.- Parameters:
className
- Binary name of the class to look up- Returns:
- ClassInfo for the specified class name or null if the specified name cannot be resolved for some reason
-
forDescriptor
Return a ClassInfo for the specified type descriptor, fetches the ClassInfo from the cache where possible.- Parameters:
descriptor
- Internal descriptor of the type to inspectlookup
- Lookup type to use (literal/element)- Returns:
- ClassInfo for the specified class name or null if the specified name cannot be resolved for some reason
-
forType
Return a ClassInfo for the specified class type, fetches the ClassInfo from the cache where possible and generates the class meta if not.- Parameters:
type
- Type to look uplookup
- Lookup type to use (literal/element)- Returns:
- ClassInfo for the supplied type or null if the supplied type cannot be found or is a primitive type
-
fromCache
Return a ClassInfo for the specified class name, but only if the class information already exists in the cache. This prevents class loads in the instance that a ClassInfo is only being retrieved for a class which should definitely have already been processed but will be missing in case of an error condition.- Parameters:
className
- Binary name of the class to look up- Returns:
- ClassInfo for the specified class name or null if the specified class does not have an entry in the cache
-
fromCache
Return a ClassInfo for the specified class type, but only if the class information already exists in the cache. This prevents class loads in the instance that a ClassInfo is only being retrieved for a class which should definitely have already been processed but will be missing in case of an error condition.- Parameters:
type
- Type to look uplookup
- Lookup type to use (literal/element)- Returns:
- ClassInfo for the supplied type or null if the supplied type does not have an entry in the cache
-
getCommonSuperClass
ASM logic applied via ClassInfo, returns first common superclass of classes specified by type1 and type2.- Parameters:
type1
- First typetype2
- Second type- Returns:
- common superclass info
-
getCommonSuperClass
public 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.- Parameters:
type1
- First typetype2
- Second type- Returns:
- common superclass info
-
getCommonSuperClassOrInterface
ASM logic applied via ClassInfo, returns first common superclass of classes specified by type1 and type2.- Parameters:
type1
- First typetype2
- Second type- Returns:
- common superclass info
-
getCommonSuperClassOrInterface
public 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.- Parameters:
type1
- First typetype2
- Second type- Returns:
- common superclass info
-
getCommonSuperClassOrInterface
ASM logic applied via ClassInfo, returns first common superclass or interface of classes specified by type1 and type2.- Parameters:
type1
- First typetype2
- Second type- Returns:
- common superclass info
-