|
Lombok - v0.11.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlombok.bytecode.ClassFileMetaData
public class ClassFileMetaData
Utility to read the constant pool, header, and inheritance information of any class file.
| Constructor Summary | |
|---|---|
ClassFileMetaData(byte[] byteCode)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassFileMetaData(byte[] byteCode)
| Method Detail |
|---|
public boolean containsUtf8(String value)
public boolean usesClass(String className)
className - must be provided JVM-style, such as java/lang/String
public boolean usesField(String className,
String fieldName)
className - must be provided JVM-style, such as java/lang/String
public boolean usesMethod(String className,
String methodName)
className - must be provided JVM-style, such as java/lang/String
public 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/String
public String getSuperClassName()
java/lang/Object
NB: If you try this on Object itself, you'll get null.java/lang/Object
public List<String> getInterfaces()
public 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.
|
Lombok - v0.11.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||