public class ClassFileMetaData extends 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(String value)
Checks if the constant pool contains the provided string constant, which implies the constant is used somewhere in the code.
|
boolean |
containsUtf8(String value)
Checks if the constant pool contains the provided 'raw' string.
|
String |
getClassName()
Returns the name of the class in JVM format, such as
java/lang/String |
List<String> |
getInterfaces()
Returns the name of all implemented interfaces.
|
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 |
String |
poolContent()
A
toString() like utility to dump all contents of the constant pool into a string. |
boolean |
usesClass(String className)
Checks if the constant pool contains a reference to the provided class.
|
boolean |
usesField(String className,
String fieldName)
Checks if the constant pool contains a reference to a given field, either for writing or reading.
|
boolean |
usesMethod(String className,
String methodName)
Checks if the constant pool contains a reference to a given method, with any signature (return type and parameter types).
|
boolean |
usesMethod(String className,
String methodName,
String descriptor)
Checks if the constant pool contains a reference to a given method.
|
public boolean containsUtf8(String value)
public boolean usesClass(String className)
className - must be provided JVM-style, such as java/lang/Stringpublic boolean usesField(String className, String fieldName)
className - must be provided JVM-style, such as java/lang/Stringpublic boolean usesMethod(String className, String methodName)
className - must be provided JVM-style, such as java/lang/Stringpublic boolean usesMethod(String className, String methodName, String descriptor)
className - must be provided JVM-style, such as java/lang/Stringdescriptor - must be provided JVM-style, such as (IZ)Ljava/lang/String;public boolean containsStringConstant(String value)
public boolean containsLong(long value)
public boolean containsDouble(double value)
public boolean containsInteger(int value)
public boolean containsFloat(float value)
public String getClassName()
java/lang/Stringpublic String getSuperClassName()
java/lang/Object
NB: If you try this on Object itself, you'll get null.java/lang/Objectpublic 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-2014 The Project Lombok Authors, licensed under the MIT licence.