com.abra.j2xb.beans.model
Class MOPropertyDescriptor

java.lang.Object
  extended by com.abra.j2xb.beans.model.MOAbstractPropertyDescriptor
      extended by com.abra.j2xb.beans.model.MOValuePropertyDescriptor
          extended by com.abra.j2xb.beans.model.MOPropertyDescriptor
All Implemented Interfaces:
MOAnnotationLocation, MOJavaValueDescriptor
Direct Known Subclasses:
MOAnnotationBasedPropertyDescriptor, MOExceptionMessagePropertyDescriptor, MOExceptionTracePropertyDescriptor

public abstract class MOPropertyDescriptor
extends MOValuePropertyDescriptor
implements MOAnnotationLocation, MOJavaValueDescriptor

Since:
JDK1.5
Version:
1.0, Jun 1, 2008
Author:
Yoav Abrahami

Nested Class Summary
static class MOPropertyDescriptor.MOPropertyMetaType
           
 
Field Summary
protected  MOBeanDescriptor beanPropertyBeanDescriptor
           
protected  MOConstructorFacade constructorFacade
           
protected  java.lang.Object defaultValue
           
protected  boolean isGlobalBeanRef
           
protected  MOPropertyDescriptor.MOPropertyMetaType propertyMetaType
           
protected  java.util.List<MOPropertySimpleTypeDescriptor> simpleTypeDescriptors
           
 
Fields inherited from class com.abra.j2xb.beans.model.MOAbstractPropertyDescriptor
group
 
Constructor Summary
MOPropertyDescriptor(java.beans.PropertyDescriptor propertyDescriptor, MOBeanDescriptor beanDescriptor)
           
 
Method Summary
 java.lang.Class<?> findPropertyByPath(java.lang.Class<?> classToSearch, java.lang.String propertyPath)
          The method searches for a property in the classToSearch, where the path indicates the property name.
 MOBeansFactory getBeansFactory()
           
 MOBeanDescriptor getBeanValueBeanDescriptor()
           
abstract  java.lang.String getChoiceDiscriminator()
           
abstract  java.lang.String[] getChoiceOptions()
           
abstract  MOCollectionCustomSort getCollectionCustomSort()
           
abstract  java.lang.Class<?> getCollectionItemClass()
           
abstract  MOCollectionSort getCollectionSort()
           
 MOConstructorFacade getConstructorFacade()
           
 java.lang.Object getDefaultValue()
           
abstract  java.lang.String getDefaultValueAsString()
           
abstract  java.lang.String[] getEnumSetDefaults()
           
abstract  java.lang.String getGlobalTypeName()
           
abstract  java.lang.String getGroupByGroupingPropertyXmlName()
           
abstract  java.lang.String getGroupByName()
           
abstract  java.lang.String getGroupByObjectPropertyName()
           
 java.lang.String getLocation()
           
protected  MOBeanDescriptor getPropertyBeanDescriptor(java.lang.Class<?> beanClass)
           
 MOPropertyDescriptor.MOPropertyMetaType getPropertyMetaType()
           
 java.util.List<MOPropertySimpleTypeDescriptor> getSimpleTypeDescriptors()
           
abstract  MOValidationCollection getValidationCollection()
           
abstract  MOValidationString getValidationString()
           
 java.lang.Object getValue(java.lang.Object instance)
           
abstract  java.lang.Class<?> getValueType()
           
abstract  MOXmlDerivedType getXmlDerivedType()
           
abstract  java.lang.String getXmlName()
           
abstract  MOXmlNamespace getXmlNamespace()
           
abstract  MOXmlNamespaceRef getXmlNamespaceRef()
           
abstract  int getXmlOrder()
           
abstract  boolean isChoice()
           
abstract  boolean isChoiceProperty()
           
 boolean isCompatibleClasses(java.lang.Class<?> classToCheck, java.lang.Class<?>[]... superClasses)
           
abstract  boolean isSetGlobalType()
           
abstract  boolean isXmlAttribute()
           
abstract  boolean isXmlListStyle()
           
abstract  boolean isXmlOptional()
           
abstract  boolean isXmlValueUnion()
           
 void setValue(java.lang.Object targetInstance, java.lang.Object value)
           
 
Methods inherited from class com.abra.j2xb.beans.model.MOAbstractPropertyDescriptor
getBeanDescriptor, getCanonicalName, getDefiningMethod, getGroup, getGroupPath, getJavaPropertyDescriptor, getName, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.abra.j2xb.beans.model.MOJavaValueDescriptor
isXmlGlobalBeanRef
 

Field Detail

isGlobalBeanRef

protected boolean isGlobalBeanRef

beanPropertyBeanDescriptor

protected MOBeanDescriptor beanPropertyBeanDescriptor

constructorFacade

protected MOConstructorFacade constructorFacade

propertyMetaType

protected MOPropertyDescriptor.MOPropertyMetaType propertyMetaType

defaultValue

protected java.lang.Object defaultValue

simpleTypeDescriptors

protected java.util.List<MOPropertySimpleTypeDescriptor> simpleTypeDescriptors
Constructor Detail

MOPropertyDescriptor

public MOPropertyDescriptor(java.beans.PropertyDescriptor propertyDescriptor,
                            MOBeanDescriptor beanDescriptor)
Method Detail

getPropertyBeanDescriptor

protected MOBeanDescriptor getPropertyBeanDescriptor(java.lang.Class<?> beanClass)
                                              throws MOBeansException
Throws:
MOBeansException

getPropertyMetaType

public MOPropertyDescriptor.MOPropertyMetaType getPropertyMetaType()

findPropertyByPath

public java.lang.Class<?> findPropertyByPath(java.lang.Class<?> classToSearch,
                                             java.lang.String propertyPath)
                                      throws java.beans.IntrospectionException,
                                             MOBeansCollectionSortPropertyException
The method searches for a property in the classToSearch, where the path indicates the property name. The path can reference delegation properties using "." (e.g. key.name).

Parameters:
classToSearch - - the starting class
propertyPath - - the path.
Returns:
the class found, or null if non is found
Throws:
MOBeansCollectionSortPropertyException
java.beans.IntrospectionException

isCompatibleClasses

public boolean isCompatibleClasses(java.lang.Class<?> classToCheck,
                                   java.lang.Class<?>[]... superClasses)

getXmlName

public abstract java.lang.String getXmlName()
Specified by:
getXmlName in interface MOJavaValueDescriptor

getXmlOrder

public abstract int getXmlOrder()
Specified by:
getXmlOrder in class MOValuePropertyDescriptor

isChoice

public abstract boolean isChoice()
Specified by:
isChoice in class MOValuePropertyDescriptor

isXmlAttribute

public abstract boolean isXmlAttribute()
Specified by:
isXmlAttribute in interface MOJavaValueDescriptor

getDefaultValueAsString

public abstract java.lang.String getDefaultValueAsString()
Specified by:
getDefaultValueAsString in interface MOJavaValueDescriptor

getGroupByName

public abstract java.lang.String getGroupByName()

getGroupByGroupingPropertyXmlName

public abstract java.lang.String getGroupByGroupingPropertyXmlName()

getGroupByObjectPropertyName

public abstract java.lang.String getGroupByObjectPropertyName()

isXmlOptional

public abstract boolean isXmlOptional()
Specified by:
isXmlOptional in interface MOJavaValueDescriptor
Specified by:
isXmlOptional in class MOValuePropertyDescriptor

getEnumSetDefaults

public abstract java.lang.String[] getEnumSetDefaults()
Specified by:
getEnumSetDefaults in interface MOJavaValueDescriptor

getValidationString

public abstract MOValidationString getValidationString()
Specified by:
getValidationString in interface MOJavaValueDescriptor

getValidationCollection

public abstract MOValidationCollection getValidationCollection()
Specified by:
getValidationCollection in interface MOJavaValueDescriptor

getCollectionItemClass

public abstract java.lang.Class<?> getCollectionItemClass()
Specified by:
getCollectionItemClass in interface MOJavaValueDescriptor

getCollectionCustomSort

public abstract MOCollectionCustomSort getCollectionCustomSort()

getCollectionSort

public abstract MOCollectionSort getCollectionSort()

isXmlListStyle

public abstract boolean isXmlListStyle()
Specified by:
isXmlListStyle in interface MOJavaValueDescriptor

isXmlValueUnion

public abstract boolean isXmlValueUnion()
Specified by:
isXmlValueUnion in interface MOJavaValueDescriptor

getBeanValueBeanDescriptor

public MOBeanDescriptor getBeanValueBeanDescriptor()
Specified by:
getBeanValueBeanDescriptor in interface MOJavaValueDescriptor

isChoiceProperty

public abstract boolean isChoiceProperty()

getChoiceDiscriminator

public abstract java.lang.String getChoiceDiscriminator()

getChoiceOptions

public abstract java.lang.String[] getChoiceOptions()

getValue

public java.lang.Object getValue(java.lang.Object instance)
                          throws MOBeansPropertyAccessException,
                                 MOBeansPropertyMethodNotFound
Throws:
MOBeansPropertyAccessException
MOBeansPropertyMethodNotFound

setValue

public void setValue(java.lang.Object targetInstance,
                     java.lang.Object value)
              throws MOBeansPropertyAccessException,
                     MOBeansPropertyMethodNotFound
Throws:
MOBeansPropertyAccessException
MOBeansPropertyMethodNotFound

getValueType

public abstract java.lang.Class<?> getValueType()
Specified by:
getValueType in interface MOAnnotationLocation
Specified by:
getValueType in interface MOJavaValueDescriptor

getConstructorFacade

public MOConstructorFacade getConstructorFacade()

getBeansFactory

public MOBeansFactory getBeansFactory()

isSetGlobalType

public abstract boolean isSetGlobalType()

getGlobalTypeName

public abstract java.lang.String getGlobalTypeName()

getXmlNamespace

public abstract MOXmlNamespace getXmlNamespace()

getXmlNamespaceRef

public abstract MOXmlNamespaceRef getXmlNamespaceRef()

getXmlDerivedType

public abstract MOXmlDerivedType getXmlDerivedType()

getLocation

public java.lang.String getLocation()
Specified by:
getLocation in interface MOAnnotationLocation

getSimpleTypeDescriptors

public java.util.List<MOPropertySimpleTypeDescriptor> getSimpleTypeDescriptors()
Specified by:
getSimpleTypeDescriptors in interface MOJavaValueDescriptor

getDefaultValue

public java.lang.Object getDefaultValue()
Specified by:
getDefaultValue in interface MOJavaValueDescriptor


Copyright © 2008. All Rights Reserved.