public class LocalField
extends java.lang.Object
implements java.lang.reflect.Member
| Constructor and Description |
|---|
LocalField(int modifiers,
java.lang.Class type,
java.lang.String name,
java.lang.Object constValue)
Constructs a new local field.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getConstValue()
Returns a value of the public static final field.
|
java.lang.Class |
getDeclaringClass() |
int |
getModifiers() |
java.lang.String |
getName() |
java.lang.Class |
getType() |
boolean |
isSynthetic() |
public LocalField(int modifiers,
java.lang.Class type,
java.lang.String name,
java.lang.Object constValue)
modifiers - field modifiers, a sum of one or more of PUBLIC,
PRIVATE,PROTECTED, STATIC,
FINAL,VOLATILE, TRANSIENT
constants defined in java.lang.reflect.Modifiertype - 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.public java.lang.Class getDeclaringClass()
getDeclaringClass in interface java.lang.reflect.Memberpublic java.lang.String getName()
getName in interface java.lang.reflect.Memberpublic int getModifiers()
getModifiers in interface java.lang.reflect.Memberpublic java.lang.Class getType()
public boolean isSynthetic()
isSynthetic in interface java.lang.reflect.Memberpublic java.lang.Object getConstValue()
Fails assertion if called on the field which is not public static final.
Copyright © 1998-2015 Konstantin L. Metlov All Rights Reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the JEL manual.