Class QualifiedName

java.lang.Object
io.inverno.core.compiler.spi.QualifiedName
Direct Known Subclasses:
BeanQualifiedName, BeanSocketQualifiedName, ModuleQualifiedName

public abstract class QualifiedName extends Object

Base qualified name class.

A qualified name is of the form <part>(:<part>)+ where <part> is a valid Java name of the form <identifier>(.<identifier>)+.

Author:
Jeremy Kuhn
  • Field Details

  • Constructor Details

    • QualifiedName

      protected QualifiedName(String value)

      Creates a qualified name with the specified raw value.

      Parameters:
      value - the raw value
  • Method Details

    • validateQualifiedNamePart

      protected void validateQualifiedNamePart(String qnamePart) throws QualifiedNameFormatException

      Validates that the specified qualified name part is valid.

      A Java name is a valid qualified name part.

      Parameters:
      qnamePart - the qualified name part to validate
      Throws:
      QualifiedNameFormatException - if the specified qualified name part is invalid
    • getSimpleValue

      public abstract String getSimpleValue()

      Returns a simple representation of this qualified name.

      Note that this representation is no longer "qualified".

      Returns:
      a simple representation
    • getValue

      public String getValue()

      Returns the qualified name raw value.

      Returns:
      the raw value
    • normalize

      public String normalize()

      Returns a normalized representation of the qualified name.

      This methods basically converts the simple value to a camel case Java identifier by removing possible dots. As for the simple value the normalized representation is not "qualified".

      Returns:
      a normalized representation
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object