Class ModuleElementReference

  • All Implemented Interfaces:
    Serializable

    public class ModuleElementReference
    extends AbstractReference
    Simple class that holds a reference to an element from a module. An ModuleElementReference consists of a module representing the moduleName and an element representing the elementName. The object may either be constructed by providing the names separately or by providing a string containing both separated by a dot.
    Since:
    10.1
    Author:
    Emoke Olti
    See Also:
    Serialized Form
    • Constructor Detail

      • ModuleElementReference

        public ModuleElementReference​(String fullReference)
        Constructs a reference from a full module element name. The name passed to this method should consist of a module name, followed by a dot and an element name. This constructor will validate the name, and throw an InitialisationException when the passed name is not valid.
        Parameters:
        fullReference - String containing the module and element name separated by a dot.
    • Method Detail

      • getModule

        public String getModule()
        This method returns the module name of the reference.
        Returns:
        the module name of the reference.
      • getElement

        public String getElement()
        This method returns the element name of the reference.
        Returns:
        the element name of the reference.
      • getFullname

        public String getFullname()
      • hashCode

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

        public static boolean isValid​(String fullname)
        Validates if the supplied string is a valid module element reference notation.
        Parameters:
        fullname - string to validate.
        Returns:
        return true when valid, otherwise false.
      • validateElement

        protected static String validateElement​(String fullName,
                                                String element)