Package org.jboss.forge.roaster.model
Interface JavaType<T extends JavaType<T>>
-
- All Superinterfaces:
AnnotationTarget<T>,Internal,JavaDocCapable<T>,Named,Origin<T>,Packaged<T>,VisibilityScoped
- All Known Subinterfaces:
EnumConstant.ReadBody<O>,EnumConstantSource.Body,JavaAnnotation<O>,JavaAnnotationSource,JavaClass<O>,JavaClassSource,JavaEnum<O>,JavaEnumSource,JavaInterface<O>,JavaInterfaceSource,JavaPackageInfo<O>,JavaPackageInfoSource,JavaSource<T>
public interface JavaType<T extends JavaType<T>> extends Packaged<T>, Named, VisibilityScoped, AnnotationTarget<T>, JavaDocCapable<T>
Represents a Java type.- Author:
- Lincoln Baxter, III
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCanonicalName()Return the canonical name of thisJavaTypeinstance.JavaType<?>getEnclosingType()Return the enclosingJavaTypetype in which this class is defined.java.lang.StringgetQualifiedName()java.util.List<SyntaxError>getSyntaxErrors()Get a list of allSyntaxErrors detected in the currentJavaType.booleanhasSyntaxErrors()Return whether or not thisJavaTypecurrently has anySyntaxErrors.booleanisAnnotation()booleanisClass()booleanisEnum()booleanisInterface()java.lang.StringtoUnformattedString()Return the generated code without any formatting.-
Methods inherited from interface org.jboss.forge.roaster.model.AnnotationTarget
getAnnotation, getAnnotation, getAnnotations, hasAnnotation, hasAnnotation
-
Methods inherited from interface org.jboss.forge.roaster.Internal
getInternal
-
Methods inherited from interface org.jboss.forge.roaster.model.JavaDocCapable
getJavaDoc, hasJavaDoc
-
Methods inherited from interface org.jboss.forge.roaster.model.Packaged
getPackage, isDefaultPackage
-
Methods inherited from interface org.jboss.forge.roaster.model.VisibilityScoped
getVisibility, isPackagePrivate, isPrivate, isProtected, isPublic
-
-
-
-
Method Detail
-
getCanonicalName
java.lang.String getCanonicalName()
Return the canonical name of thisJavaTypeinstance. This is equivalent to callingClass.getCanonicalName()
-
getQualifiedName
java.lang.String getQualifiedName()
Get the qualified-name of thisJavaTypeinstance, where the qualified-name contains both the Java package and simple class name of the type represented by thisJavaTypeinstance. For example, calling:getQualifiedName()is equivalent to calling "Packaged.getPackage()+ "." +Named.getName()", which in turn is equivalent to calling:Class.getName()
-
getSyntaxErrors
java.util.List<SyntaxError> getSyntaxErrors()
Get a list of allSyntaxErrors detected in the currentJavaType. Note that when errors are present, the class may still be modified, but changes may not be completely accurate.
-
hasSyntaxErrors
boolean hasSyntaxErrors()
Return whether or not thisJavaTypecurrently has anySyntaxErrors.
-
isClass
boolean isClass()
-
isEnum
boolean isEnum()
-
isInterface
boolean isInterface()
-
isAnnotation
boolean isAnnotation()
-
getEnclosingType
JavaType<?> getEnclosingType()
Return the enclosingJavaTypetype in which this class is defined. If this class is a top-level type, and is not a nested type, this object will return itself.
-
toUnformattedString
java.lang.String toUnformattedString()
Return the generated code without any formatting.
-
-