Overview | Package | Class | Tree | Deprecated | Index | Help
| ej-technologies
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gjt.jclasslib.structures.elementvalues
Class ElementValuePair

    java.lang.Object
      org.gjt.jclasslib.structures.AbstractStructure
          org.gjt.jclasslib.structures.elementvalues.ElementValuePair

public class ElementValuePair
extends AbstractStructure

Describes an `ElementValuePair` attribute structure.

Version:
  $Revision: 1.1 $ $Date: 2004/12/28 13:04:32 $
Author:
  Vitor Carreira

Field Summary
`static String` | `ENTRY_NAME`

Fields inherited from class org.gjt.jclasslib.structures.AbstractStructure
`classFile, debug, SYSTEM_PROPERTY_DEBUG`

Constructor Summary
`ElementValuePair()`

Method Summary
`static ElementValuePair` | `create(DataInput in, ClassFile classFile)` Factory for creating `ElementValuePair` structures.
`int` | `getElementNameIndex()` Get the `element_name_index` of this element value pair.
`ElementValue` | `getElementValue()` Get the `element_value` of this element value pair.
`String` | `getEntryName()`
`protected int` | `getLength()`
`protected String` | `printAccessFlagsVerbose(int accessFlags)` Utility method for derived structures.
`void` | `read(DataInput in)` Read this structure from the given `DataInput`.
`void` | `setElementNameIndex(int elementNameIndex)` Set the `element_name_index` of this element value pair.
`void` | `setElementValue(ElementValue elementValue)` Set the `element_value` of this element value pair.
`void` | `write(DataOutput out)` Write this structure to the given `DataOutput`.

Methods inherited from class org.gjt.jclasslib.structures.AbstractStructure
`debug, getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printBytes, setClassFile, setDebug`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ENTRY_NAME

    public static final String ENTRY_NAME

See Also:
  Constant Field Values

Constructor Detail

### ElementValuePair

    public ElementValuePair()

Method Detail

### create

    public static ElementValuePair create(DataInput in,
                                          ClassFile classFile)
                                   throws InvalidByteCodeException,
                                          IOException

  Factory for creating `ElementValuePair` structures.

  Parameters:
    `in` - the `DataInput` from which to read the `ElementValuePair` structure
    `classFile` - the parent class file of the structure to be created
  Returns:
    the new `ElementValue` structure
  Throws:
    `InvalidByteCodeException` - if the byte code is invalid
    `IOException` - if an exception occurs with the `DataInput`

### getElementValue

    public ElementValue getElementValue()

  Get the `element_value` of this element value pair.

  Returns:
    the `element_value`

### setElementValue

    public void setElementValue(ElementValue elementValue)

  Set the `element_value` of this element value pair.

  Parameters:
    `elementValue` - the `element_value`

### getElementNameIndex

    public int getElementNameIndex()

  Get the `element_name_index` of this element value pair.

  Returns:
    the `element_name_index`

### setElementNameIndex

    public void setElementNameIndex(int elementNameIndex)

  Set the `element_name_index` of this element value pair.

  Parameters:
    `elementNameIndex` - the `element_name_index`

### read

    public void read(DataInput in)
              throws InvalidByteCodeException,
                     IOException

  Description copied from class: `AbstractStructure`
  Read this structure from the given `DataInput`.

  Excpects `DataInput` to be in JVM class file format and just before a structure of this kind. No look ahead parsing since the class file format is deterministic.

  Overrides:
    `read` in class `AbstractStructure`
  Parameters:
    `in` - the `DataInput` from which to read
  Throws:
    `IOException` - if an exception occurs with the `DataInput`
    `InvalidByteCodeException` - if the byte code is invalid

### write

    public void write(DataOutput out)
               throws InvalidByteCodeException,
                      IOException

  Description copied from class: `AbstractStructure`
  Write this structure to the given `DataOutput`.

  The written bytes are in JVM class file format.

  Overrides:
    `write` in class `AbstractStructure`
  Parameters:
    `out` - the `DataOutput` to which to write
  Throws:
    `IOException` - if an exception occurs with the `DataOutput`
    `InvalidByteCodeException` - if the structure is internally inconsistent

### printAccessFlagsVerbose

    protected String printAccessFlagsVerbose(int accessFlags)

  Description copied from class: `AbstractStructure`
  Utility method for derived structures. Print an access flag as a space separated list of verbose java access modifiers.

  Specified by:
    `printAccessFlagsVerbose` in class `AbstractStructure`
  Parameters:
    `accessFlags` - the unsigned short value to print as a hex string
  Returns:
    the hex string

### getLength

    protected int getLength()

### getEntryName

    public String getEntryName()

Overview | Package | Class | Tree | Deprecated | Index | Help
| ej-technologies
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD