Class BeanQualifiedName

java.lang.Object
io.inverno.core.compiler.spi.QualifiedName
io.inverno.core.compiler.spi.BeanQualifiedName

public class BeanQualifiedName extends QualifiedName

A qualified name identifying a bean.

The raw representation of a bean qualified name is of the form ModuleQualifiedName():<beanName> where <beanName> is a valid Java name (eg. com.example.myModule:myBean).

The name of a bean is tightly linked to the name of the corresponding Java class.

Author:
Jeremy Kuhn
  • Constructor Details

    • BeanQualifiedName

      public BeanQualifiedName(ModuleQualifiedName moduleQName, String beanName) throws QualifiedNameFormatException

      Creates a bean qualified name from the specified module qualified name and bean name.

      Parameters:
      moduleQName - the qualified name of the module defining the bean
      beanName - the name of the bean
      Throws:
      QualifiedNameFormatException - if the specified bean name is invalid.
  • Method Details

    • getSimpleValue

      public String getSimpleValue()
      Description copied from class: QualifiedName

      Returns a simple representation of this qualified name.

      Note that this representation is no longer "qualified".

      Specified by:
      getSimpleValue in class QualifiedName
      Returns:
      a simple representation
    • getModuleQName

      public ModuleQualifiedName getModuleQName()

      Returns the qualified name of the module defining the bean.

      Returns:
      a module qualified name
    • getBeanName

      public String getBeanName()

      Returns the name of the bean.

      Returns:
      the bean name.
    • valueOf

      public static BeanQualifiedName valueOf(String qname) throws QualifiedNameFormatException

      Creates a bean qualified name from the specified raw value of the form ModuleQualifiedName():<beanName> where <beanName> is a valid Java name.

      Parameters:
      qname - a raw qualified name
      Returns:
      a bean qualified name
      Throws:
      QualifiedNameFormatException - if the specified value is not a bean qualified name