|
||||||||||
| 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(Field field,
String text,
String shortText)
Constructor with field, text and abbreviation. |
|
| Method Summary | |
|---|---|
static List<LabelFieldInfo> |
create(Class<?> clasz,
Locale locale)
Returns label informations for all field of a class that are annotated with Label. |
static LabelFieldInfo |
create(Field field,
Locale locale)
Returns the label information for a given field of a class. |
boolean |
equals(Object obj)
|
Field |
getField()
Returns the field. |
String |
getTextOrField()
Returns the text of the label or the name of the field if the text is null. |
int |
hashCode()
|
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(Field field,
String text,
String shortText)
field - The field.text - Text.shortText - Abbreviation of the text.| Method Detail |
|---|
@Ensures(value="\result != null") public final Field getField()
@Ensures(value="\result != null") public final String getTextOrField()
null.
public final int hashCode()
hashCode in class Objectpublic final boolean equals(Object obj)
equals in class Object
@Requires(value="(clasz != null) && (locale != null)")
@Ensures(value="\result != null")
public static List<LabelFieldInfo> create(Class<?> clasz,
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(Field field,
Locale locale)
field - Field within the class.locale - Locale to use.
null.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||