info.magnolia.content2bean
Class TypeDescriptor

java.lang.Object
  extended by info.magnolia.content2bean.TypeDescriptor
Direct Known Subclasses:
PropertiesBasedTypeDescriptor

public class TypeDescriptor
extends Object

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

Version:
$Id: TypeDescriptor.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
philipp

Constructor Summary
TypeDescriptor()
           
 
Method Summary
 ItemType getItemType()
           
 Map<String,PropertyTypeDescriptor> getPropertyDescriptors()
          This method is not synchronized to avoid thread blocking, but the method guarantees that the returned map is not mutated afterward.
 PropertyTypeDescriptor getPropertyTypeDescriptor(String properyName)
           
 Content2BeanTransformer getTransformer()
          Can return a custom transformer.
 Class<?> getType()
           
 boolean isCollection()
           
 boolean isMap()
           
 boolean needsDefaultMapping()
           
 void setCollection(boolean isCollection)
           
 void setItemType(ItemType itemType)
           
 void setMap(boolean isMap)
           
 void setTransformer(Content2BeanTransformer 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 ItemType getItemType()

setItemType

public void setItemType(ItemType 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)

getPropertyTypeDescriptor

public PropertyTypeDescriptor getPropertyTypeDescriptor(String properyName)

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()
This method is not synchronized to avoid thread blocking, but the method guarantees that the returned map is not mutated afterward.


getTransformer

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


setTransformer

public void setTransformer(Content2BeanTransformer transformer)


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