LocalField (JEL API)
Keywords: gnu.jel.LocalField class

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

## gnu.jel
Class LocalField

    java.lang.Object
      gnu.jel.LocalField

All Implemented Interfaces:
  Member

Direct Known Subclasses:
  LocalMethod

    public class LocalField

extends Object
implements Member

Represents a field local to the class being compiled.

Field Summary

Fields inherited from interface java.lang.reflect.Member
`DECLARED, PUBLIC`

Constructor Summary
`LocalField(int modifiers, Class type, String name, Object constValue)` Constructs a new local field.

Method Summary
`Object` | `getConstValue()` Returns a value of the public static final field.
`Class` | `getDeclaringClass()`
`int` | `getModifiers()`
`String` | `getName()`
`Class` | `getType()`
`boolean` | `isSynthetic()`

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

Constructor Detail

### LocalField

    public LocalField(int modifiers,
                      Class type,
                      String name,
                      Object constValue)

  Constructs a new local field.

  Parameters:
    `modifiers` - field modifiers, a sum of one or more of `PUBLIC`, `PRIVATE`,`PROTECTED`, `STATIC`, `FINAL`,`VOLATILE`, `TRANSIENT` constants defined in java.lang.reflect.Modifier
    `type` - is a class representing the type of this field.
    `name` - is the name of this field.
    `constValue` - is the value of this field if it is static final, `null` otherwise.

Method Detail

### getDeclaringClass

    public Class getDeclaringClass()

  Specified by:
    `getDeclaringClass` in interface `Member`

### getName

    public String getName()

  Specified by:
    `getName` in interface `Member`

### getModifiers

    public int getModifiers()

  Specified by:
    `getModifiers` in interface `Member`

### getType

    public Class getType()

### isSynthetic

    public boolean isSynthetic()

  Specified by:
    `isSynthetic` in interface `Member`

### getConstValue

    public Object getConstValue()

  Returns a value of the public static final field.

  Fails assertion if called on the field which is not public static final.

  Returns:
    value of the field, object of wrapped primitive type or string.

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

Copyright © 1998-2006 Konstantin L. Metlov All Rights Reserved.