|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fuin.utils4swing.annotations.AnnotationUtils
public final class AnnotationUtils
Helper methods for annotation.
| Method Summary | |
|---|---|
static java.lang.String |
getLabelText(java.lang.Class clasz,
java.lang.String fieldName,
Label label,
java.util.Locale locale)
Retrieve the text for a field with a @Label annotation. |
static java.lang.String |
getStandardText(java.lang.Class clasz,
java.lang.String fieldName,
java.util.Locale locale)
Try to read the text for a field that is NOT annotated with @Label from a resource bundle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String getLabelText(java.lang.Class clasz,
java.lang.String fieldName,
Label label,
java.util.Locale locale)
@Label annotation.
clasz - Class containing the field with the @Label
annotation - Cannot be null.fieldName - Name of the field annotated with @Label - Cannot
be null.label - Label the field is annotated with - Cannot be
null.locale - Locale to use - Cannot be null.
public static java.lang.String getStandardText(java.lang.Class clasz,
java.lang.String fieldName,
java.util.Locale locale)
@Label from a resource bundle. The resource bundle is
expected to be in the same package and has the same name as
clasz. Example: For "org.fuin.example.MyClass" the resource
bundle is something like "/org/fuin/example/MyClass.properties" or
"/org/fuin/example/MyClass_en.properties". The fieldName is
used as key within the resource bundle. If the key is not found
fieldName is returned itself.
clasz - Class with the field - Cannot be null.fieldName - Field within the class - Cannot be null.locale - Locale to use - Cannot be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||