info.magnolia.jcr.node2bean
Class TypeDescriptor

java.lang.Object
  extended by info.magnolia.jcr.node2bean.TypeDescriptor

public class TypeDescriptor
extends Object

Describes the type under the transformation. Can be used to customize the output of the transformation.


Constructor Summary
TypeDescriptor()
           
 
Method Summary
 String getItemType()
           
 Map<String,PropertyTypeDescriptor> getPropertyDescriptors(TypeMapping typeMapping)
          This method is not synchronized to avoid thread blocking, but the method guarantees that the returned map is not mutated afterward.
 PropertyTypeDescriptor getPropertyTypeDescriptor(String propertyName, TypeMapping typeMapping)
           
 Node2BeanTransformer getTransformer()
          Can return a custom transformer.
 Class<?> getType()
           
 boolean isArray()
           
 boolean isCollection()
           
 boolean isMap()
           
 boolean needsDefaultMapping()
           
 void setArray(boolean isArray)
           
 void setCollection(boolean isCollection)
           
 void setItemType(String itemType)
           
 void setMap(boolean isMap)
           
 void setTransformer(Node2BeanTransformer transformer)
           
 void setType(Class<?> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeDescriptor

public TypeDescriptor()
Method Detail

getItemType

public String getItemType()

setItemType

public void setItemType(String itemType)

getType

public Class<?> getType()

setType

public void setType(Class<?> type)

isCollection

public boolean isCollection()

setCollection

public void setCollection(boolean isCollection)

isMap

public boolean isMap()

setMap

public void setMap(boolean isMap)

isArray

public boolean isArray()

setArray

public void setArray(boolean isArray)

getPropertyTypeDescriptor

public PropertyTypeDescriptor getPropertyTypeDescriptor(String propertyName,
                                                        TypeMapping typeMapping)

needsDefaultMapping

public boolean needsDefaultMapping()
Returns:
true if this descriptor represents an map or collection, without a concrete type thereof.

getPropertyDescriptors

public Map<String,PropertyTypeDescriptor> getPropertyDescriptors(TypeMapping typeMapping)
This method is not synchronized to avoid thread blocking, but the method guarantees that the returned map is not mutated afterward.


getTransformer

public Node2BeanTransformer getTransformer()
Can return a custom transformer. Otherwise null.


setTransformer

public void setTransformer(Node2BeanTransformer transformer)


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.