Class ComponentKey

java.lang.Object
net.sf.jasperreports.engine.component.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:
  • Constructor Details

    • 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 Details

    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals 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
    • getName

      public String getName()
      Returns the component name.

      The value must match a component name in the components bundle, as used in ComponentsBundle.getComponentManager(String).

      Returns:
      the coponent name
    • 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