|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fuin.objects4j.LabelInfo
org.fuin.objects4j.LabelFieldInfo
@Immutable public final class LabelFieldInfo
Label information for a field of a class.
| Constructor Summary | |
|---|---|
LabelFieldInfo(java.lang.reflect.Field field,
java.lang.String text,
java.lang.String shortText)
Constructor with field, text and abbreviation. |
|
| Method Summary | |
|---|---|
static java.util.List<LabelFieldInfo> |
create(java.lang.Class<?> clasz,
java.util.Locale locale)
Returns label informations for all field of a class that are annotated with Label. |
static LabelFieldInfo |
create(java.lang.reflect.Field field,
java.util.Locale locale)
Returns the label information for a given field of a class. |
boolean |
equals(java.lang.Object obj)
|
java.lang.reflect.Field |
getField()
Returns the field. |
java.lang.String |
getTextOrField()
Returns the text of the label or the name of the field if the text is null. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class org.fuin.objects4j.LabelInfo |
|---|
getResourceBundle, getShortText, getShortText, getText, getText, toNullableString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
@Requires(value="field != null")
public LabelFieldInfo(java.lang.reflect.Field field,
java.lang.String text,
java.lang.String shortText)
field - The field.text - Text.shortText - Abbreviation of the text.| Method Detail |
|---|
@Ensures(value="\result != null") public final java.lang.reflect.Field getField()
@Ensures(value="\result != null") public final java.lang.String getTextOrField()
null.
public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Object
@Requires(value="(clasz != null) && (locale != null)")
@Ensures(value="\result != null")
public static java.util.List<LabelFieldInfo> create(java.lang.Class<?> clasz,
java.util.Locale locale)
Label. All other fields ar ignored.
clasz - Class that contains the fields.locale - Locale to use.
@Requires(value="(field != null) && (locale != null)")
public static LabelFieldInfo create(java.lang.reflect.Field field,
java.util.Locale locale)
field - Field within the class.locale - Locale to use.
null.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||