Interface IContext

    • Method Detail

      • getString

        String getString​(String name)
        Gets a string property of this context.
        Parameters:
        name - the name of the property to retrieve.
        Returns:
        the value of the property or null if it not defined.
      • setString

        void setString​(String name,
                       String value)
        Sets a string property for this context. If the property is already defined its value will be overwritten.
        Parameters:
        name - the name of the property to set.
        value - the value to set.
      • getBoolean

        boolean getBoolean​(String name)
        Gets a boolean property of this context.
        Parameters:
        name - the name of the property to retrieve.
        Returns:
        the value of the property or false if it is not defined.
      • setBoolean

        void setBoolean​(String name,
                        boolean value)
        Sets a boolean property for this context. If the property is already defined its value will be overwritten.
        Parameters:
        name - the name of the property to set.
        value - the value to set.
      • getInteger

        int getInteger​(String name)
        Gets an integer property of this context.
        Parameters:
        name - the name of the property to retrieve.
        Returns:
        the value of the property or 0 if it is not defined.
      • setInteger

        void setInteger​(String name,
                        int value)
        Sets an integer property for this context. If the property is already defined its value will be overwritten.
        Parameters:
        name - the name of the property to set.
        value - the value to set.
      • getObject

        Object getObject​(String name)
        Gets an object property of this context.
        Parameters:
        name - the name of the property to retrieve.
        Returns:
        the value of the property or null if it is not defined.
      • setObject

        void setObject​(String name,
                       Object value)
        Sets an object property for this context. If the property is already defined its value will be overwritten.
        Parameters:
        name - the name of the property to set.
        value - the value to set.
      • removeProperty

        void removeProperty​(String name)
        Removes a given property from this context. If the property does not exist nothing happens.
        Parameters:
        name - the name of the property to remove.
      • getProperties

        Map<String,​Object> getProperties()
        Gets the map of the existing properties for this context.
        Returns:
        the map of the properties for this context. May be empty but not null.
      • clearProperties

        void clearProperties()
        Removes all properties from this context.
      • getAnnotation

        <A extends IAnnotation> A getAnnotation​(Class<A> type)
        Gets the annotation of a given type for this context.
        Type Parameters:
        A - the class type.
        Parameters:
        type - the type of the annotation to retrieve.
        Returns:
        the annotation for the given type, or null if it is not defined.
      • setAnnotation

        void setAnnotation​(IAnnotation annotation)
        Sets an annotation for this context.
        Parameters:
        annotation - the annotation to set. If one of this type already exists it will be overwritten.
      • clearAnnotations

        void clearAnnotations()
        Removes all annotations from this context.