public class TopLevelClass extends InnerClass implements CompilationUnit
Constructor and Description |
---|
TopLevelClass(FullyQualifiedJavaType type) |
TopLevelClass(String typeName) |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(CompilationUnitVisitor<R> visitor) |
void |
addFileCommentLine(String commentLine)
Comments will be written at the top of the file as is, we do not append any start or end comment characters.
|
void |
addImportedType(FullyQualifiedJavaType importedType) |
void |
addImportedType(String importedType) |
void |
addImportedTypes(Set<FullyQualifiedJavaType> importedTypes) |
void |
addStaticImport(String staticImport) |
void |
addStaticImports(Set<String> staticImports) |
List<String> |
getFileCommentLines() |
Set<FullyQualifiedJavaType> |
getImportedTypes() |
Set<String> |
getStaticImports() |
addInitializationBlock, addTypeParameter, getInitializationBlocks, getSuperClass, getTypeParameters, isAbstract, isFinal, setAbstract, setFinal, setSuperClass, setSuperClass
addField, addInnerClass, addInnerEnum, addInnerInterface, addMethod, addSuperInterface, getFields, getInnerClasses, getInnerEnums, getInnerInterfaces, getMethods, getSuperInterfaceTypes, getType
addAnnotation, addJavaDocLine, addSuppressTypeWarningsAnnotation, getAnnotations, getJavaDocLines, getVisibility, isStatic, setStatic, setVisibility
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType
public TopLevelClass(FullyQualifiedJavaType type)
public TopLevelClass(String typeName)
public Set<FullyQualifiedJavaType> getImportedTypes()
getImportedTypes
in interface CompilationUnit
public void addImportedType(String importedType)
public void addImportedType(FullyQualifiedJavaType importedType)
addImportedType
in interface CompilationUnit
public void addFileCommentLine(String commentLine)
CompilationUnit
Note that in the Eclipse plugin, file comments will not be merged.
addFileCommentLine
in interface CompilationUnit
commentLine
- the comment linepublic List<String> getFileCommentLines()
getFileCommentLines
in interface CompilationUnit
public void addImportedTypes(Set<FullyQualifiedJavaType> importedTypes)
addImportedTypes
in interface CompilationUnit
public Set<String> getStaticImports()
getStaticImports
in interface CompilationUnit
public void addStaticImport(String staticImport)
addStaticImport
in interface CompilationUnit
public void addStaticImports(Set<String> staticImports)
addStaticImports
in interface CompilationUnit
public <R> R accept(CompilationUnitVisitor<R> visitor)
accept
in interface CompilationUnit
Copyright © 2006–2022 MyBatis.org. All rights reserved.