Package org.eclipse.steady.java
Class JavaEnumId
- java.lang.Object
-
- org.eclipse.steady.ConstructId
-
- org.eclipse.steady.java.JavaId
-
- org.eclipse.steady.java.JavaEnumId
-
- All Implemented Interfaces:
Comparable<ConstructId>
public class JavaEnumId extends JavaId
Identifies a Java enum.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.steady.java.JavaId
JavaId.Type
-
-
Constructor Summary
Constructors Constructor Description JavaEnumId(JavaId _declaration_ctx, String _simple_name)Constructor for creating the identifier of an enum.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.booleanisNested()Returns true if the enum is not directly declared within a package, but within another construct like a class or interface.-
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
-
isNested
public boolean isNested()
Returns true if the enum is not directly declared within a package, but within another construct like a class or interface.- 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.
-
-