joie
Class Field

java.lang.Object
  |
  +--joie.Member
        |
        +--joie.Field
All Implemented Interfaces:
FilterObject

public class Field
extends Member

Defines a Field of a class as it is represented in the classfile.

Version:
0.9
Author:
Geoff Cohen, Olaf Görlitz

Field Summary
 
Fields inherited from class joie.Member
access_flags, acount, attr_count, attribs, cinfo, cpool, desc, desc_index, name, name_index
 
Fields inherited from interface joie.io.FilterObject
APPENDED, CLEAN, DIRTY, DIRTY_IN_PLACE, DIRTY_SAME_SIZE
 
Constructor Summary
protected Field()
          Protected to prevent from unwanted instantiation.
  Field(java.lang.String name, Type type)
          Creates a new Field with the given name and type.
 
Method Summary
 Type getType()
          Returns the type of the Field.
protected static Field readField(ByteStream in)
          Reads in a new Field from the ByteStream
 void resolveType()
           
 void setClassInfo(ClassInfo cinfo)
          Sets the new ClassInfo reference.
 
Methods inherited from class joie.Member
addAttribute, assignClassInfo, getAttributes, getClassName, getDescIndex, getDescriptor, getModifiers, getName, getNameIndex, getStatus, init, readFromByteStream, rebind, resolve, serialize, serializeAppend, serializeInPlace, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

protected Field()
Protected to prevent from unwanted instantiation.


Field

public Field(java.lang.String name,
             Type type)
Creates a new Field with the given name and type.

Parameters:
name - the field name
type - the field type
Method Detail

readField

protected static Field readField(ByteStream in)
                          throws java.io.IOException
Reads in a new Field from the ByteStream

Parameters:
in - the input stream
Returns:
the read field
java.io.IOException

getType

public Type getType()
Returns the type of the Field.

Returns:
the type

resolveType

public void resolveType()

setClassInfo

public void setClassInfo(ClassInfo cinfo)
Description copied from class: Member
Sets the new ClassInfo reference.

Overrides:
setClassInfo in class Member
Parameters:
cinfo - the ClassInfo