edu.rit.classfile
Class SynthesizedInterfaceFieldDescription

java.lang.Object
  extended by edu.rit.classfile.FieldReference
      extended by edu.rit.classfile.FieldDescription
          extended by edu.rit.classfile.SynthesizedFieldDescription
              extended by edu.rit.classfile.SynthesizedInterfaceFieldDescription

public class SynthesizedInterfaceFieldDescription
extends SynthesizedFieldDescription

Class SynthesizedInterfacefieldDescription is used to synthesize a field description for some actual field that is part of an interface. All interface fields are public, static, and final. To synthesize an interface field:

  1. Create an instance of class SynthesizedInterfaceFieldDescription, specifying the interface, the field's name, and the field's type. In this case, the interface's class initializer code will have to set the field's value.

    — OR —

  2. Create an instance of class SynthesizedInterfaceFieldDescription, specifying the interface, the field's name, and the field's constant value. In this case the JVM will automatically initialize the field to the given constant value.

In the documentation below, the term "described field" means "the synthesized interface field described by this synthesized interface field description object."

To synthesize a class field, see class SynthesizedClassFieldDescription. To synthesize a class constant field, see class SynthesizedClassConstantFieldDescription.


Constructor Summary
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, boolean theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and boolean constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, byte theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and byte constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, char theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and character constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, double theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and double constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, float theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and float constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, int theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and integer constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, long theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and long constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, short theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and short constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, String theValue)
          Construct a new synthesized interface field description object with the given interface, field name, and string constant value.
SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription, String theFieldName, TypeReference theFieldType)
          Construct a new synthesized interface field description object with the given interface, field name, and field type.
 
Method Summary
 
Methods inherited from class edu.rit.classfile.FieldDescription
getConstantValue, isFinal, isPackageScoped, isPrivate, isProtected, isPublic, isStatic, isTransient, isVolatile
 
Methods inherited from class edu.rit.classfile.FieldReference
equals, getClassReference, getFieldDescriptor, getFieldName, getFieldType, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            TypeReference theFieldType)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and field type. The described field is public, static, and final. In this case, the interface's class initializer code will have to set the field's value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theFieldType - Field type.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null, theFieldName is null, or theFieldType is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            String theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and string constant value. The described field is public, static, and final, and its type is java.lang.String. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - String constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null, theFieldName is null, or theValue is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            int theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and integer constant value. The described field is public, static, and final, and its type is int. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - Integer constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null or theFieldName is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            short theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and short constant value. The described field is public, static, and final, and its type is short. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - Short constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null or theFieldName is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            char theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and character constant value. The described field is public, static, and final, and its type is char. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - Character constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null or theFieldName is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            byte theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and byte constant value. The described field is public, static, and final, and its type is byte. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - Byte constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null or theFieldName is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            boolean theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and boolean constant value. The described field is public, static, and final, and its type is boolean. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - Boolean constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null or theFieldName is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            float theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and float constant value. The described field is public, static, and final, and its type is float. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - Float constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null or theFieldName is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            long theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and long constant value. The described field is public, static, and final, and its type is long. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - Long constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null or theFieldName is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).

SynthesizedInterfaceFieldDescription

public SynthesizedInterfaceFieldDescription(SynthesizedInterfaceDescription theInterfaceDescription,
                                            String theFieldName,
                                            double theValue)
                                     throws ListFullException
Construct a new synthesized interface field description object with the given interface, field name, and double constant value. The described field is public, static, and final, and its type is double. In this case the JVM will automatically initialize the field to the given constant value. As a side effect, the described field is added to the given interface.

Parameters:
theInterfaceDescription - Interface containing this field.
theFieldName - Field name.
theValue - Double constant value.
Throws:
NullPointerException - (unchecked exception) Thrown if theInterfaceDescription is null or theFieldName is null.
IllegalArgumentException - (unchecked exception) Thrown if theFieldName is zero length.
ListFullException - Thrown if the requisite constant pool entries could not be added because the constant pool is full. Also thrown if theInterfaceDescription's field list is full (i.e., contains 65535 fields).


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.