public class ClassFileMetaData
extends java.lang.Object
Constructor and Description |
---|
ClassFileMetaData(byte[] byteCode) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsDouble(double value)
Checks if the constant pool contains the provided double constant, which implies the constant is used somewhere in the code.
|
boolean |
containsFloat(float value)
Checks if the constant pool contains the provided float constant, which implies the constant is used somewhere in the code.
|
boolean |
containsInteger(int value)
Checks if the constant pool contains the provided int constant, which implies the constant is used somewhere in the code.
|
boolean |
containsLong(long value)
Checks if the constant pool contains the provided long constant, which implies the constant is used somewhere in the code.
|
boolean |
containsStringConstant(java.lang.String value)
Checks if the constant pool contains the provided string constant, which implies the constant is used somewhere in the code.
|
boolean |
containsUtf8(java.lang.String value)
Checks if the constant pool contains the provided 'raw' string.
|
java.lang.String |
getClassName()
Returns the name of the class in JVM format, such as
java/lang/String |
java.util.List<java.lang.String> |
getInterfaces()
Returns the name of all implemented interfaces.
|
java.lang.String |
getSuperClassName()
Returns the name of the superclass in JVM format, such as
java/lang/Object
NB: If you try this on Object itself, you'll get null .NB2: For interfaces and annotation interfaces, you'll always get java/lang/Object |
java.lang.String |
poolContent()
A
toString() like utility to dump all contents of the constant pool into a string. |
boolean |
usesClass(java.lang.String className)
Checks if the constant pool contains a reference to the provided class.
|
boolean |
usesField(java.lang.String className,
java.lang.String fieldName)
Checks if the constant pool contains a reference to a given field, either for writing or reading.
|
boolean |
usesMethod(java.lang.String className,
java.lang.String methodName)
Checks if the constant pool contains a reference to a given method, with any signature (return type and parameter types).
|
boolean |
usesMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String descriptor)
Checks if the constant pool contains a reference to a given method.
|
public boolean containsUtf8(java.lang.String value)
public boolean usesClass(java.lang.String className)
className
- must be provided JVM-style, such as java/lang/String
public boolean usesField(java.lang.String className, java.lang.String fieldName)
className
- must be provided JVM-style, such as java/lang/String
public boolean usesMethod(java.lang.String className, java.lang.String methodName)
className
- must be provided JVM-style, such as java/lang/String
public boolean usesMethod(java.lang.String className, java.lang.String methodName, java.lang.String descriptor)
className
- must be provided JVM-style, such as java/lang/String
descriptor
- must be provided JVM-style, such as (IZ)Ljava/lang/String;
public boolean containsStringConstant(java.lang.String value)
public boolean containsLong(long value)
public boolean containsDouble(double value)
public boolean containsInteger(int value)
public boolean containsFloat(float value)
public java.lang.String getClassName()
java/lang/String
public java.lang.String getSuperClassName()
java/lang/Object
NB: If you try this on Object itself, you'll get null
.java/lang/Object
public java.util.List<java.lang.String> getInterfaces()
public java.lang.String poolContent()
toString()
like utility to dump all contents of the constant pool into a string.
NB: No guarantees are made about the exact layout of this string. It is for informational purposes only, don't try to parse it.(cont.)
in the returned string.Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.