org.apache.bval.util
Class FieldAccess

java.lang.Object
  extended by org.apache.bval.util.AccessStrategy
      extended by org.apache.bval.util.FieldAccess

public class FieldAccess
extends AccessStrategy

Description: direct field access strategy.


Constructor Summary
FieldAccess(Field field)
          Create a new FieldAccess instance.
 
Method Summary
 boolean equals(Object o)
          
 Object get(Object instance)
          Get the value from the given instance.
 ElementType getElementType()
          Get the Java program ElementType used by this AccessStrategy to determine property values.
 Type getJavaType()
          Get the type of the property
 String getPropertyName()
          Get a name representative of this property.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldAccess

public FieldAccess(Field field)
Create a new FieldAccess instance.

Parameters:
field -
Method Detail

get

public Object get(Object instance)
Get the value from the given instance.

Specified by:
get in class AccessStrategy
Returns:
the value

getElementType

public ElementType getElementType()
Get the Java program ElementType used by this AccessStrategy to determine property values.

Specified by:
getElementType in class AccessStrategy
Returns:
ElementType

getJavaType

public Type getJavaType()
Get the type of the property

Specified by:
getJavaType in class AccessStrategy
Returns:
Type

getPropertyName

public String getPropertyName()
Get a name representative of this property.

Specified by:
getPropertyName in class AccessStrategy
Returns:
String

toString

public String toString()

Overrides:
toString in class Object

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright © 2010-2012 Apache Software Foundation. All Rights Reserved.