Class CollectionMetaData

All Implemented Interfaces:
Serializable

public class CollectionMetaData extends ContainerMetaData
Representation of the MetaData of a collection.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • element

      protected ContainerComponent element
      Representation of the element of the collection.
    • singleElement

      protected boolean singleElement
      Whether this collection handles more than one element. Some collection, e.g. java.lang.Optional, will always hold only one element.
  • Constructor Details

    • CollectionMetaData

      public CollectionMetaData(CollectionMetaData collmd)
      Constructor to create a copy of the passed metadata.
      Parameters:
      collmd - The metadata to copy
    • CollectionMetaData

      public CollectionMetaData()
      Default constructor. Set the fields using setters, before populate().
  • Method Details

    • populate

      public void populate(ClassLoaderResolver clr, ClassLoader primary)
      Method to populate any defaults, and check the validity of the MetaData.
      Parameters:
      clr - ClassLoaderResolver to use for any loading operations
      primary - the primary ClassLoader to use (or null)
    • elementIsPersistent

      public boolean elementIsPersistent()
    • getElementClassMetaData

      public AbstractClassMetaData getElementClassMetaData(ClassLoaderResolver clr)
      Convenience accessor for the Element ClassMetaData.
      Parameters:
      clr - ClassLoader resolver (in case we need to initialise it)
      Returns:
      element ClassMetaData
    • isEmbeddedElement

      public boolean isEmbeddedElement()
      Accessor for the embedded-element tag value
      Returns:
      embedded-element tag value
    • isDependentElement

      public boolean isDependentElement()
      Accessor for The dependent-element attribute indicates that the collection's element contains a reference that is to be deleted if the referring instance is deleted.
      Returns:
      dependent-element tag value
    • isSerializedElement

      public boolean isSerializedElement()
      Accessor for the serialized-element tag value
      Returns:
      serialized-element tag value
    • getElementType

      public String getElementType()
      Accessor for the element-type tag value.
      Returns:
      element-type tag value
    • getElementTypes

      public String[] getElementTypes()
    • setElementType

      public CollectionMetaData setElementType(String type)
    • setEmbeddedElement

      public CollectionMetaData setEmbeddedElement(boolean embedded)
    • setSerializedElement

      public CollectionMetaData setSerializedElement(boolean serialized)
    • setDependentElement

      public CollectionMetaData setDependentElement(boolean dependent)
    • setSingleElement

      public CollectionMetaData setSingleElement(boolean singleElement)
    • getReferencedClassMetaData

      void getReferencedClassMetaData(List<AbstractClassMetaData> orderedCmds, Set<AbstractClassMetaData> referencedCmds, ClassLoaderResolver clr)
      Accessor for all ClassMetaData referenced by this array.
      Parameters:
      orderedCmds - List of ordered ClassMetaData objects (added to).
      referencedCmds - Set of all ClassMetaData objects (added to).
      clr - the ClassLoaderResolver
    • toString

      public String toString()
      Overrides:
      toString in class Object