Package org.eclipse.steady.java
Class JavaClassId
- java.lang.Object
-
- org.eclipse.steady.ConstructId
-
- org.eclipse.steady.java.JavaId
-
- org.eclipse.steady.java.JavaClassId
-
- All Implemented Interfaces:
Comparable<ConstructId>
public class JavaClassId extends JavaId
Identifies a Java class (normal or nested).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.steady.java.JavaId
JavaId.Type
-
-
Constructor Summary
Constructors Constructor Description JavaClassId(JavaId _declaration_ctx, String _simple_name)Constructor for creating the identifier of a nested class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaClassInitgetClassInit()getClassInit.ConstructIdgetDefinitionContext()getDefinitionContext.JavaPackageIdgetJavaPackageId()Returns the Java package in the context of which the construct is defined.StringgetName()Returns a class name that is unique within the package in which the class is defined.StringgetQualifiedName()Returns the fully qualified class name, i.e., including the name of the package in which the class is defined.StringgetSimpleName()Returns the class name without considering any context.booleanisNestedClass()isNestedClass.booleanisTestClass()isTestClass.-
Methods inherited from class org.eclipse.steady.java.JavaId
addAnnotation, equals, filter, filter, filter, filterWithContext, getAnnotations, getClassId, getCompilationUnit, getCompilationUnit, getJarUrl, getJarUrl, getJavaId, getSharedType, getType, hasAnnotation, hashCode, parameterTypesToString, parameterTypesToString, parseClassInitQName, parseClassQName, parseConstructorQName, parseConstructorQName, parseEnumQName, parseMethodQName, parseMethodQName, removePackageContext, toCoreType, toCoreType, toGSON, toJSON, toSharedType, toString, typeFromString, typeToString
-
Methods inherited from class org.eclipse.steady.ConstructId
compareTo, getLanguage, getSharedType, toSharedType
-
-
-
-
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:
getQualifiedNamein classConstructId
-
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:
getNamein classConstructId
-
getSimpleName
public String getSimpleName()
Returns the class name without considering any context.- Specified by:
getSimpleNamein classConstructId
-
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:
getDefinitionContextin classJavaId- Returns:
- a
ConstructIdobject.
-
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:
getJavaPackageIdin classJavaId- Returns:
- a
JavaPackageIdobject.
-
getClassInit
public JavaClassInit getClassInit()
getClassInit.
- Returns:
- a
JavaClassInitobject.
-
isTestClass
public boolean isTestClass()
isTestClass.
- Returns:
- a boolean.
-
-