Class JavaClassId

  • All Implemented Interfaces:
    Comparable<ConstructId>

    public class JavaClassId
    extends JavaId
    Identifies a Java class (normal or nested).
    • Constructor Detail

      • JavaClassId

        public JavaClassId​(JavaId _declaration_ctx,
                           String _simple_name)
        Constructor for creating the identifier of a nested class.
        Parameters:
        _declaration_ctx - a JavaId object.
        _simple_name - a String object.
    • Method Detail

      • isNestedClass

        public boolean isNestedClass()

        isNestedClass.

        Returns:
        a boolean.
      • getQualifiedName

        public String getQualifiedName()
        Returns the fully qualified class name, i.e., including the name of the package in which the class is defined.
        Specified by:
        getQualifiedName in class ConstructId
      • getName

        public String getName()
        Returns a class name that is unique within the package in which the class is defined. In case of nested classes, the names of parent classes will be included (e.g., OuterClass$InnerClass).
        Specified by:
        getName in class ConstructId
      • getSimpleName

        public String getSimpleName()
        Returns the class name without considering any context.
        Specified by:
        getSimpleName in class ConstructId
      • getDefinitionContext

        public ConstructId getDefinitionContext()

        getDefinitionContext.

        Returns the name of the Java package in which the class or nested class is defined. Returns null if a class is defined outside of a package.
        Specified by:
        getDefinitionContext in class JavaId
        Returns:
        a ConstructId object.
      • getJavaPackageId

        public JavaPackageId getJavaPackageId()
        Returns the Java package in the context of which the construct is defined. Returns the Java package in the context of which the construct is defined.
        Specified by:
        getJavaPackageId in class JavaId
        Returns:
        a JavaPackageId object.
      • isTestClass

        public boolean isTestClass()

        isTestClass.

        Returns:
        a boolean.