Class 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 to obtain new instances.
    Author:
    Tony Chemit - dev@tchemit.fr
    See Also:
    Serialized Form
    • 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)
      • 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)