jaxx.runtime.context
Class JAXXContextEntryDef<O>

java.lang.Object
  extended by jaxx.runtime.context.JAXXContextEntryDef<O>
Type Parameters:
O - type of the entry associated to the definition
All Implemented Interfaces:
Serializable

public class JAXXContextEntryDef<O>
extends Object
implements Serializable

To qualify an entry in a JAXXContext.

Use the factory methods newContextEntryDef and newListContextEntryDef

Author:
tchemit
See Also:
Serialized Form

Field Summary
protected  Class<O> klass
          class of the entry, can not be null
protected  String name
          name of the entry, can be nuill for a unamed entry.
 
Constructor Summary
JAXXContextEntryDef(Class<Map> mapClass, String name)
          Special constructor for map, otherwise it is not possible to cast to O
JAXXContextEntryDef(Class<O> klass)
           
JAXXContextEntryDef(String name, Class<O> klass)
           
 
Method Summary
 boolean accept(Class<?> klass, String name)
           
 boolean accept2(Class<?> klass, String name)
           
 boolean equals(Object o)
           
 O getContextValue(JAXXContext context)
           
 Class<O> getKlass()
           
 String getName()
           
 int hashCode()
           
 void removeContextValue(JAXXContext context)
           
 void setContextValue(JAXXContext context, O value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
name of the entry, can be nuill for a unamed entry.


klass

protected Class<O> klass
class of the entry, can not be null

Constructor Detail

JAXXContextEntryDef

public JAXXContextEntryDef(Class<O> klass)

JAXXContextEntryDef

public JAXXContextEntryDef(Class<Map> mapClass,
                           String name)
Special constructor for map, otherwise it is not possible to cast to O

Parameters:
mapClass - map class
name - name of content
Since:
2.0.2

JAXXContextEntryDef

public JAXXContextEntryDef(String name,
                           Class<O> klass)
Method Detail

getName

public String getName()

getKlass

public Class<O> getKlass()

getContextValue

public O getContextValue(JAXXContext context)

removeContextValue

public void removeContextValue(JAXXContext context)

setContextValue

public void setContextValue(JAXXContext context,
                            O value)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

accept

public boolean accept(Class<?> klass,
                      String name)

accept2

public boolean accept2(Class<?> klass,
                       String name)


Copyright © 2008-2011 CodeLutin. All Rights Reserved.