public class Constant extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Constant.Class |
static class |
Constant.Double |
static class |
Constant.Dummy |
static class |
Constant.FieldRef |
static class |
Constant.Float |
static class |
Constant.Info |
static class |
Constant.Integer |
static class |
Constant.InterfaceMethodRef |
static class |
Constant.Long |
static class |
Constant.MethodRef |
static class |
Constant.NameType |
static class |
Constant.String |
static class |
Constant.Utf8 |
| Constructor and Description |
|---|
Constant() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addPoolItem(Constant.Info item,
Set<Constant.Info> constantPool)
Recursively add a CONSTANT_Info object to a constant pool.
|
static Constant.Class |
buildClass(JvmType.Array type)
This method creates a CONSTANT_Class object from an Array
|
static Constant.Class |
buildClass(JvmType.Clazz type)
This method creates a CONSTANT_Class object from a Type Clazz
|
static Constant.Class |
buildClass(JvmType.Reference type)
This method creates a CONSTANT_Class object from a Type Reference
|
static Constant.FieldRef |
buildFieldRef(JvmType.Clazz owner,
String name,
JvmType type)
Creates a CONSTANT_FieldRef object.
|
static Constant.InterfaceMethodRef |
buildInterfaceMethodRef(JvmType.Reference owner,
String name,
JvmType type)
Creates a CONSTANT_InterfaceMethodRef object.
|
static Constant.MethodRef |
buildMethodRef(JvmType.Reference owner,
String name,
JvmType type)
Creates a CONSTANT_MethodRef object.
|
static Constant.Info |
fromNumber(Number c)
This method creates a CONSTANT_info object from a Number object.
|
static Constant.String |
fromString(String c)
This method creates a CONSTANT_info object from a String
|
public static Constant.String fromString(String c)
c - public static Constant.Info fromNumber(Number c)
c - public static Constant.Class buildClass(JvmType.Reference type)
type - Reference type from which CONSTANT_class is createdpublic static Constant.Class buildClass(JvmType.Clazz type)
type - Class type from which CONSTANT_class object is created.public static Constant.Class buildClass(JvmType.Array type)
type - Array type from which CONSTANT_class is constructedpublic static Constant.FieldRef buildFieldRef(JvmType.Clazz owner, String name, JvmType type)
owner - name - type - public static Constant.MethodRef buildMethodRef(JvmType.Reference owner, String name, JvmType type)
owner - name - type - public static Constant.InterfaceMethodRef buildInterfaceMethodRef(JvmType.Reference owner, String name, JvmType type)
owner - name - type - public static void addPoolItem(Constant.Info item, Set<Constant.Info> constantPool)
item - Item to be added to pool.constantPool - Constant pool to which item is added.Copyright © 2016. All rights reserved.