name.pehl.piriti.rebind.type
Class TypeContext

java.lang.Object
  extended by name.pehl.piriti.rebind.type.TypeContext

public class TypeContext
extends Object

Holds information about the reader / writer type, the type to be (de)serialized and its properties, references and id.

Version:
$LastChangedRevision:$
Author:
$LastChangedBy:$

Constructor Summary
TypeContext(com.google.gwt.core.ext.typeinfo.JClassType type, com.google.gwt.core.ext.typeinfo.JClassType rwType)
          Construct a new instance of this class
 
Method Summary
 void addProperty(PropertyContext propertyContext)
           
 void addReference(PropertyContext propertyContext)
           
 PropertyContext getId()
           
 com.google.gwt.core.ext.typeinfo.JClassType getInstanceCreator()
           
 List<PropertyContext> getProperties()
           
 List<PropertyContext> getReferences()
           
 com.google.gwt.core.ext.typeinfo.JClassType getRwType()
           
 com.google.gwt.core.ext.typeinfo.JClassType getStopAt()
           
 com.google.gwt.core.ext.typeinfo.JClassType getType()
          The type of the POJO to be (de)serialized.
 boolean isJson()
           
 boolean isReader()
           
 boolean isWriter()
           
 boolean isXml()
           
static int nextOrder()
           
 PropertyContext removeProperty(String property)
           
 PropertyContext removeReference(String property)
           
 void setId(PropertyContext propertyContext)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeContext

public TypeContext(com.google.gwt.core.ext.typeinfo.JClassType type,
                   com.google.gwt.core.ext.typeinfo.JClassType rwType)
Construct a new instance of this class

Parameters:
type - The type of the class
rwType - The type of the reader or writer interface
Method Detail

nextOrder

public static int nextOrder()

toString

public String toString()
Overrides:
toString in class Object

isJson

public boolean isJson()

isXml

public boolean isXml()

addProperty

public void addProperty(PropertyContext propertyContext)

removeProperty

public PropertyContext removeProperty(String property)

addReference

public void addReference(PropertyContext propertyContext)

removeReference

public PropertyContext removeReference(String property)

getType

public com.google.gwt.core.ext.typeinfo.JClassType getType()
The type of the POJO to be (de)serialized.

Returns:
the type of the POJO to be (de)serialized

getRwType

public com.google.gwt.core.ext.typeinfo.JClassType getRwType()

isReader

public boolean isReader()
Returns:
true if getRwType() references a JsonReader or XmlReader, false otherwise.

isWriter

public boolean isWriter()
Returns:
true if getRwType() references a JsonWriter or XmlWriter, false otherwise.

getInstanceCreator

public com.google.gwt.core.ext.typeinfo.JClassType getInstanceCreator()

getStopAt

public com.google.gwt.core.ext.typeinfo.JClassType getStopAt()

getId

public PropertyContext getId()

setId

public void setId(PropertyContext propertyContext)

getProperties

public List<PropertyContext> getProperties()

getReferences

public List<PropertyContext> getReferences()


Copyright © 2012 Harald Pehl. All Rights Reserved.