jasm.lang
Class Constant

java.lang.Object
  extended by jasm.lang.Constant

public class Constant
extends java.lang.Object


Nested Class Summary
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 Summary
Constant()
           
 
Method Summary
static void addPoolItem(Constant.Info item, java.util.Set<Constant.Info> constantPool)
          Recursively add a CONSTANT_Info object to a constant pool.
static Constant.Class buildClass(JvmType.Array r)
          This method creates a CONSTANT_Class object from an Array
static Constant.Class buildClass(JvmType.Clazz r)
          This method creates a CONSTANT_Class object from a Type Clazz
static Constant.Class buildClass(JvmType.Reference r)
          This method creates a CONSTANT_Class object from a Type Reference
static Constant.FieldRef buildFieldRef(JvmType.Clazz owner, java.lang.String name, JvmType type)
          Creates a CONSTANT_FieldRef object.
static Constant.InterfaceMethodRef buildInterfaceMethodRef(JvmType.Clazz owner, java.lang.String name, JvmType type)
          Creates a CONSTANT_InterfaceMethodRef object.
static Constant.MethodRef buildMethodRef(JvmType.Clazz owner, java.lang.String name, JvmType type)
          Creates a CONSTANT_MethodRef object.
static Constant.Info fromNumber(java.lang.Number c)
          This method creates a CONSTANT_info object from a Number object.
static Constant.String fromString(java.lang.String c)
          This method creates a CONSTANT_info object from a String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constant

public Constant()
Method Detail

fromString

public static Constant.String fromString(java.lang.String c)
This method creates a CONSTANT_info object from a String

Parameters:
c -
Returns:

fromNumber

public static Constant.Info fromNumber(java.lang.Number c)
This method creates a CONSTANT_info object from a Number object.

Parameters:
c -
Returns:

buildClass

public static Constant.Class buildClass(JvmType.Reference r)
This method creates a CONSTANT_Class object from a Type Reference

Parameters:
c -
Returns:

buildClass

public static Constant.Class buildClass(JvmType.Clazz r)
This method creates a CONSTANT_Class object from a Type Clazz

Parameters:
c -
Returns:

buildClass

public static Constant.Class buildClass(JvmType.Array r)
This method creates a CONSTANT_Class object from an Array

Parameters:
c -
Returns:

buildFieldRef

public static Constant.FieldRef buildFieldRef(JvmType.Clazz owner,
                                              java.lang.String name,
                                              JvmType type)
Creates a CONSTANT_FieldRef object.

Parameters:
owner -
name -
type -
Returns:

buildMethodRef

public static Constant.MethodRef buildMethodRef(JvmType.Clazz owner,
                                                java.lang.String name,
                                                JvmType type)
Creates a CONSTANT_MethodRef object.

Parameters:
owner -
name -
type -
Returns:

buildInterfaceMethodRef

public static Constant.InterfaceMethodRef buildInterfaceMethodRef(JvmType.Clazz owner,
                                                                  java.lang.String name,
                                                                  JvmType type)
Creates a CONSTANT_InterfaceMethodRef object.

Parameters:
owner -
name -
type -
Returns:

addPoolItem

public static void addPoolItem(Constant.Info item,
                               java.util.Set<Constant.Info> constantPool)
Recursively add a CONSTANT_Info object to a constant pool. Items used by this item which are not already in the pool are also added.



Copyright © 2013 David J. Pearce. All Rights Reserved.