|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.meta.view.DefaultMetaForm
public class DefaultMetaForm
Default implementation of MetaForm that works from a list of PropertyInfo objects. This is primarily to make subclasses easier to write and to provide an "identity" MetaForm implementation. Right now this MetaForm implementation is mutable so that it can be more easily configured. Still up in the air whether or not forms will be mutable in the long run so I'm not making this Fixable.
Field Summary |
---|
Fields inherited from interface org.progeeks.meta.view.MetaForm |
---|
FORM_ANNOTATION |
Constructor Summary | |
---|---|
DefaultMetaForm()
Creates an uninitialized MetaForm. |
|
DefaultMetaForm(MetaClass metaClass,
java.util.List names)
Creates a meta-form for the specified class and property names. |
|
DefaultMetaForm(java.lang.String className,
java.util.List names)
Creates a meta-form for the specified class and property infos. |
Method Summary | |
---|---|
MetaClass |
getMetaClass()
Returns the meta-class to which this form is associated. |
java.lang.String |
getMetaClassName()
Returns the meta-class name associated with this form. |
int |
getPropertyCount()
Returns the number of properties in this form. |
PropertyInfo |
getPropertyInfo(int index)
Returns a PropertyInfo object for the specified index. |
PropertyMutator |
getPropertyMutator(MetaObject target,
int index)
Returns a PropertyMutator from the specified MetaObject for the specified index. |
java.util.List |
getPropertyNames()
Returns the list of property names provided by this form. |
protected boolean |
isValidProperty(java.lang.String name)
Returns true if the specified name is a valid property name. |
void |
setMetaClass(MetaClass metaClass)
Sets the meta-class for this form. |
void |
setMetaClassName(java.lang.String name)
Sets the meta-class by name. |
void |
setPropertyNames(java.util.List names)
Sets the names and order of properties to be included in this form. |
java.lang.String |
toString()
|
protected void |
validateProperties()
Called to validate the list of names against the associated meta-class if both exist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultMetaForm()
public DefaultMetaForm(MetaClass metaClass, java.util.List names)
public DefaultMetaForm(java.lang.String className, java.util.List names)
Method Detail |
---|
public void setMetaClass(MetaClass metaClass)
public MetaClass getMetaClass()
getMetaClass
in interface MetaForm
public void setMetaClassName(java.lang.String name)
public java.lang.String getMetaClassName()
public void setPropertyNames(java.util.List names)
public java.util.List getPropertyNames()
getPropertyNames
in interface MetaForm
public int getPropertyCount()
getPropertyCount
in interface MetaForm
public PropertyInfo getPropertyInfo(int index)
getPropertyInfo
in interface MetaForm
public PropertyMutator getPropertyMutator(MetaObject target, int index)
getPropertyMutator
in interface MetaForm
protected boolean isValidProperty(java.lang.String name)
protected void validateProperties()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |