org.beanfabrics.support
Class PropertySupport

java.lang.Object
  extended by org.beanfabrics.support.PropertySupport
All Implemented Interfaces:
Support

public class PropertySupport
extends java.lang.Object
implements Support


Nested Class Summary
static class PropertySupport.FieldDecl
           
static class PropertySupport.MethodDecl
           
static class PropertySupport.PropertyDeclaration
           
 
Constructor Summary
PropertySupport(PresentationModel pModel)
           
 
Method Summary
 void accept(PresentationModelFilter filter, PresentationModelVisitor visitor)
           
 java.lang.Iterable<PresentationModel> filterProperties(PresentationModelFilter filter)
           
static PropertySupport get(PresentationModel model)
           
 java.lang.String getName(PresentationModel child)
           
 java.util.Collection<PresentationModel> getProperties()
           
 java.util.Collection<PresentationModel> getProperties(PresentationModelFilter filter)
           
 PresentationModel getProperty(Path path)
           
 PresentationModel getProperty(java.lang.String name)
           
static java.util.List<PropertySupport.PropertyDeclaration> getPropertyDeclarations(java.lang.Class cls)
          Returns a list of all non-conflicting, explicit and inplicit property declarations that can be found in the given class (and its superclasses and interfaces).
 java.util.Collection<java.lang.String> getPropertyNames()
           
 java.lang.Class<? extends PresentationModel> getPropertyType(java.lang.String name)
           
<M extends PresentationModel>
M
putProperty(java.lang.String name, M value, java.lang.Class<M> type)
           
 void refresh()
           
 PresentationModel removeProperty(java.lang.String name)
           
 void revalidateProperties()
           
 void setup()
          Setup this PropertySupport by processing all Property annotations found in the supported PresentationModel.
 void setup(java.lang.Class cls)
          Setup this PropertySupport by processing only those Property annotations that are found in the given Class and all superclasses of the current PresentationModel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySupport

public PropertySupport(PresentationModel pModel)
Method Detail

get

public static PropertySupport get(PresentationModel model)

refresh

public void refresh()

setup

public void setup()
Setup this PropertySupport by processing all Property annotations found in the supported PresentationModel.


setup

public void setup(java.lang.Class cls)
Setup this PropertySupport by processing only those Property annotations that are found in the given Class and all superclasses of the current PresentationModel.

Parameters:
cls -

filterProperties

public java.lang.Iterable<PresentationModel> filterProperties(PresentationModelFilter filter)

getProperties

public java.util.Collection<PresentationModel> getProperties(PresentationModelFilter filter)

getPropertyNames

public java.util.Collection<java.lang.String> getPropertyNames()

getPropertyType

public java.lang.Class<? extends PresentationModel> getPropertyType(java.lang.String name)

getName

public java.lang.String getName(PresentationModel child)

revalidateProperties

public void revalidateProperties()

getProperties

public java.util.Collection<PresentationModel> getProperties()

getProperty

public PresentationModel getProperty(java.lang.String name)

getProperty

public PresentationModel getProperty(Path path)

putProperty

public <M extends PresentationModel> M putProperty(java.lang.String name,
                                                   M value,
                                                   java.lang.Class<M> type)

removeProperty

public PresentationModel removeProperty(java.lang.String name)

accept

public void accept(PresentationModelFilter filter,
                   PresentationModelVisitor visitor)

getPropertyDeclarations

public static java.util.List<PropertySupport.PropertyDeclaration> getPropertyDeclarations(java.lang.Class cls)
Returns a list of all non-conflicting, explicit and inplicit property declarations that can be found in the given class (and its superclasses and interfaces).

Parameters:
cls -
Returns:
a list of all non-conflicting, explicit and inplicit property declarations of the given class