org.fuin.objects4j
Class TextFieldInfo

java.lang.Object
  extended by org.fuin.objects4j.TextFieldInfo

@Immutable
public class TextFieldInfo
extends java.lang.Object

Information about a text field.


Constructor Summary
TextFieldInfo(java.lang.reflect.Field field, int width)
          Constructor with all data.
 
Method Summary
static TextFieldInfo create(java.lang.reflect.Field field, java.util.Locale locale)
          Return the text field information for a given field.
 boolean equals(java.lang.Object obj)
           
 java.lang.reflect.Field getField()
          Returns the field.
 int getWidth()
          Returns the width of the text field.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFieldInfo

@Requires(value="(field != null) && (width != null)")
public TextFieldInfo(java.lang.reflect.Field field,
                                   int width)
Constructor with all data.

Parameters:
field - The field.
width - Number of characters to be shown.
Method Detail

getField

@Ensures(value="\result != null")
public final java.lang.reflect.Field getField()
Returns the field.

Returns:
Field.

getWidth

public final int getWidth()
Returns the width of the text field.

Returns:
Number of characters.

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

create

@Requires(value="(field != null) && (locale!=null)")
public static TextFieldInfo create(java.lang.reflect.Field field,
                                                 java.util.Locale locale)
Return the text field information for a given field.

Parameters:
field - Field to check for @TextField annotation.
locale - Locale to use.
Returns:
Information or null.


Copyright © 2010 Future Invent Informationsmanagement GmbH. All Rights Reserved.