|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bibeault.jrjournal.ccc.ClassConstantInspector
Service class that looks up the value of class constants. This class considers "class constant" to mean a field with modifiers: public, static and final.
Constructor Summary | |
ClassConstantInspector(java.lang.String constantPath)
Constructs a class constant inspector for the passed field. |
Method Summary | |
java.lang.Object |
getValue()
Returns the value of the inspected class constant. |
static java.lang.Object |
getValue(java.lang.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(java.lang.String constantPath) throws java.lang.ClassNotFoundException, java.lang.NoSuchFieldException
constantPath
- the fully qualified name of the class class constant
java.lang.ClassNotFoundException
- if the named class does not exist
java.lang.NoSuchFieldException
- if the named field does not exists
java.lang.IllegalArgumentException
- if the class or field fails to meet the constrictions described aboveMethod Detail |
public java.lang.Object getValue() throws java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.IllegalAccessException
- if the field cannot be accessed
java.lang.InstantiationException
- if the class cannot be instantiatedpublic static java.lang.Object getValue(java.lang.String constantName) throws java.lang.NoSuchFieldException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
constantName
- the fully qualified name of the class class constant
java.lang.NoSuchFieldException
- if the field does not exist
java.lang.ClassNotFoundException
- if the class does not exist
java.lang.IllegalAccessException
- if the field cannot be accessed
java.lang.InstantiationException
- if the class cannot be instantiated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |