Class DefaultJAXXContext

    • Constructor Detail

      • DefaultJAXXContext

        public DefaultJAXXContext()
    • Method Detail

      • setContextValue

        public <T> void setContextValue​(T o)
        Description copied from interface: JAXXContext
        Push in the context a new unamed entry. If a previous entry exists in context (unamed and same class), it will be removed.
        Specified by:
        setContextValue in interface JAXXContext
        Type Parameters:
        T - type of data to set in context
        Parameters:
        o - the value to push in context
      • setContextValue

        public <T> void setContextValue​(T o,
                                        String name)
        Description copied from interface: JAXXContext
        * Push in the context a new amed entry. If a previous entry exists in context (same name and class), it will be removed.
        Specified by:
        setContextValue in interface JAXXContext
        Type Parameters:
        T - type of data to set in context
        Parameters:
        o - the value to push in context
        name - the name of the new entry
      • getContextValue

        public <T> T getContextValue​(Class<T> clazz)
        Description copied from interface: JAXXContext
        Seek for a unamed entry in the context This is an exemple to call a method in JAXX : <JButton onActionPerformed='{getContextValue(Action.class).method(args[])}'/>
        Specified by:
        getContextValue in interface JAXXContext
        Type Parameters:
        T - type of data to obtain from context
        Parameters:
        clazz - the class of unamed entry to seek in context
        Returns:
        the value of the unamed entry for the given class, or null if no such entry.
      • getContextValue

        public <T> T getContextValue​(Class<T> clazz,
                                     String name)
        Description copied from interface: JAXXContext
        Seek for a named entry in the context
        Specified by:
        getContextValue in interface JAXXContext
        Type Parameters:
        T - type of data to obtain from context
        Parameters:
        clazz - the class of named entry to seek in context
        name - the name of the entry to seek in context
        Returns:
        the value of the named entry for the given class, or null if no such entry.
      • removeContextValue

        public <T> void removeContextValue​(Class<T> klazz)
        Description copied from interface: JAXXContext
        Remove from context the value with the given klazz as an unamed entry
        Specified by:
        removeContextValue in interface JAXXContext
        Type Parameters:
        T - type of data to remove from context
        Parameters:
        klazz - the klazz entry
      • removeContextValue

        public <T> void removeContextValue​(Class<T> klazz,
                                           String name)
        Description copied from interface: JAXXContext
        Remove from context the value with the given klazz as an unamed (if name is null) or named entry
        Specified by:
        removeContextValue in interface JAXXContext
        Type Parameters:
        T - type of data to remove from context
        Parameters:
        klazz - the klazz entry
        name - extra name of the entry
      • getKeys

        public String[] getKeys​(Class<?> klass)
        Obtain all the keys of data for a given type.
        Parameters:
        klass - the type of searched keys
        Returns:
        the array of all names of keys for the given type of data
        Since:
        1.3
      • clear

        public void clear()
      • remove0

        protected <T> T remove0​(Class<T> klass,
                                String name)
      • getParentContext

        protected JAXXContext getParentContext()
      • setParentContext

        protected void setParentContext​(JAXXContext parentContext)