Class CompositeName

java.lang.Object
net.sourceforge.pmd.lang.modelica.resolver.CompositeName

public final class CompositeName extends Object
An immutable composite name representation for use in "pattern matching style". Supports lightweight splitting into first element and "tail" (everything else).
  • Field Details

  • Method Details

    • create

      public static CompositeName create(boolean isAbsolute, String[] components)
    • create

      public static CompositeName create(boolean isAbsolute, String[] components, int prefixLength)
    • create

      public static CompositeName create(String simpleName)
    • isEmpty

      public boolean isEmpty()
    • getHead

      public String getHead()
    • getTail

      public CompositeName getTail()
    • matchPrefix

      public CompositeName matchPrefix(String[] prefix)
      Tries to match the prefix argument with the first elements of this name
      Returns:
      the remaining elements on success or null on failure
    • toString

      public String toString()
      Overrides:
      toString in class Object