Class AbstractObjectDescription

    • Constructor Detail

      • AbstractObjectDescription

        protected AbstractObjectDescription​(Class className)
        Creates a new object description.
        Parameters:
        className - the class.
    • Method Detail

      • setParameterDefinition

        public void setParameterDefinition​(String name,
                                           Class obj)
        Sets the class for a parameter.
        Parameters:
        name - the parameter name.
        obj - the parameter class.
      • convertPrimitiveClass

        public static Class convertPrimitiveClass​(Class obj)
        Converts primitives to corresponding object class.
        Parameters:
        obj - the class.
        Returns:
        The class.
      • getDefinedParameterNames

        protected Iterator getDefinedParameterNames()
        Returns an iterator for the parameter names.
        Returns:
        The iterator.
      • getParameter

        public Object getParameter​(String name)
        Returns a parameter value.
        Specified by:
        getParameter in interface ObjectDescription
        Parameters:
        name - the parameter name.
        Returns:
        The parameter value.
      • getInstance

        public ObjectDescription getInstance()
        Returns a cloned instance of the object description. The contents of the parameter objects collection are cloned too, so that any already defined parameter value is copied to the new instance.

        Parameter definitions are not cloned, as they are considered read-only.

        The newly instantiated object description is not configured. If it need to be configured, then you have to call configure on it.

        Specified by:
        getInstance in interface ObjectDescription
        Returns:
        A cloned instance.
      • getUnconfiguredInstance

        public ObjectDescription getUnconfiguredInstance()
        Returns a cloned instance of the object description. The contents of the parameter objects collection are cloned too, so that any already defined parameter value is copied to the new instance.

        Parameter definitions are not cloned, as they are considered read-only.

        The newly instantiated object description is not configured. If it need to be configured, then you have to call configure on it.

        Specified by:
        getUnconfiguredInstance in interface ObjectDescription
        Returns:
        A cloned instance.
      • configure

        public void configure​(org.pentaho.reporting.libraries.base.config.Configuration config)
        Configures this factory. The configuration contains several keys and their defined values. The given reference to the configuration object will remain valid until the report parsing or writing ends.

        The configuration contents may change during the reporting.

        Specified by:
        configure in interface ObjectDescription
        Parameters:
        config - the configuration, never null
      • getConfig

        public org.pentaho.reporting.libraries.base.config.Configuration getConfig()
        Returns the configuration for that object description.
        Returns:
        the configuration or null, if not yet set.
      • equals

        public boolean equals​(Object o)
        Tests for equality.
        Specified by:
        equals in interface ObjectDescription
        Overrides:
        equals in class Object
        Parameters:
        o - the object to test.
        Returns:
        A boolean.