|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.jstl.constant.reflect.ClassConstantInspector
public class ClassConstantInspector
Inspector class that analyses a class and extract its constant filed value.
Constructor Summary | |
---|---|
ClassConstantInspector(String constantPath)
Constructs a class constant inspector for the passed field. |
Method Summary | |
---|---|
Object |
getValue()
Returns the value of the inspected class constant. |
static Object |
getValue(String constantName)
Static convenience method to obtain the value of a constant. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassConstantInspector(String constantPath) throws ClassNotFoundException, NoSuchFieldException
constantPath
- the fully qualified name of the class class constant
ClassNotFoundException
- if the named class does not exist
NoSuchFieldException
- if the named field does not exists
IllegalArgumentException
- if the class or field fails to meet the constrictions
described aboveMethod Detail |
---|
public Object getValue() throws IllegalAccessException, InstantiationException
IllegalAccessException
- if the field cannot be accessed
InstantiationException
- if the class cannot be instantiatedpublic static Object getValue(String constantName) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException
constantName
- the fully qualified name of the class class constant
NoSuchFieldException
- if the field does not exist
ClassNotFoundException
- if the class does not exist
IllegalAccessException
- if the field cannot be accessed
InstantiationException
- if the class cannot be instantiated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |