com.vaadin.addon.jpacontainer.metadata
Class PropertyMetadata

java.lang.Object
  extended by com.vaadin.addon.jpacontainer.metadata.PropertyMetadata
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PersistentPropertyMetadata

public class PropertyMetadata
extends Object
implements Serializable

This class represents the metadata of a property. If the property is transient, this is an ordinary JavaBean property consisting of a getter method and optionally a setter method. If the property is persistent, additional information is provided by the PersistentPropertyMetadata interface.

Since:
1.0
Author:
Petter Holmström (Vaadin Ltd)
See Also:
ClassMetadata, Serialized Form

Field Summary
protected  Class<?> getterDeclaringClass
           
protected  String getterName
           
protected  Class<?> setterDeclaringClass
           
protected  String setterName
           
 
Method Summary
 boolean equals(Object obj)
           
<T extends Annotation>
T
getAnnotation(Class<T> annotationClass)
          Gets the annotation of the specified annotation class, if available.
 Annotation[] getAnnotations()
          The annotations of the property, if any.
 String getName()
          The name of the property.
 PropertyKind getPropertyKind()
           
 Class<?> getType()
          The type of the property.
 int hashCode()
           
 boolean isWritable()
          Returns whether the property is writable or not.
 Object readResolve()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

getterName

protected final String getterName

setterName

protected final String setterName

getterDeclaringClass

protected final Class<?> getterDeclaringClass

setterDeclaringClass

protected final Class<?> setterDeclaringClass
Method Detail

readResolve

public Object readResolve()
                   throws ObjectStreamException
Throws:
ObjectStreamException

getName

public String getName()
The name of the property.


getType

public Class<?> getType()
The type of the property.


getAnnotations

public Annotation[] getAnnotations()
The annotations of the property, if any.

See Also:
getAnnotation(java.lang.Class)

getAnnotation

public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
Gets the annotation of the specified annotation class, if available.

Parameters:
annotationClass - the annotation class.
Returns:
the annotation, or null if not found.
See Also:
getAnnotations(), Class.getAnnotation(java.lang.Class)

isWritable

public boolean isWritable()
Returns whether the property is writable or not. Transient properties (i.e. JavaBean properties) are only writable if they have a setter method.

Returns:
true if the property is writable, false if it is not.

getPropertyKind

public PropertyKind getPropertyKind()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013 Vaadin Ltd. All rights reserved.