Class ComponentKey

  • All Implemented Interfaces:
    Serializable

    public class ComponentKey
    extends Object
    implements Serializable
    A key identifying a component type/class.

    A component type is identified by a namespace and a component name. An instance of this class includes in addition a namespace prefix, which is required when producing a JRXML representation of the component (via JRXmlWriter).

    Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
    See Also:
    JRComponentElement.getComponentKey(), Serialized Form
    • Constructor Detail

      • ComponentKey

        public ComponentKey​(String namespace,
                            String namespacePrefix,
                            String name)
        Create a component type key.
        Parameters:
        namespace - the component namespace
        namespacePrefix - the prefix to use for the namespace
        name - the component name
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getNamespace

        public String getNamespace()
        Returns the component namespace.

        This value must match the namespece of a components bundle, as returned by ComponentsXmlParser.getNamespace().

        Returns:
        the component namespace
      • getNamespacePrefix

        public String getNamespacePrefix()
        Returns the namespace prefix which is to be used when producing an XML representation of a component of this type.
        Returns:
        the namespace prefix