Interface CompilationUnit
- All Known Implementing Classes:
Interface
,TopLevelClass
,TopLevelEnumeration
public interface CompilationUnit
This interface describes methods common to all Java compilation units (Java
classes, interfaces, and enums).
- Author:
- Jeff Butler
-
Method Summary
Modifier and TypeMethodDescription<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
addImportedTypes
(Set<FullyQualifiedJavaType> importedTypes) void
addStaticImport
(String staticImport) void
addStaticImports
(Set<String> staticImports) getType()
-
Method Details
-
getImportedTypes
Set<FullyQualifiedJavaType> getImportedTypes() -
getStaticImports
-
getType
FullyQualifiedJavaType getType() -
addImportedType
-
addImportedTypes
-
addStaticImport
-
addStaticImports
-
addFileCommentLine
Comments will be written at the top of the file as is, we do not append any start or end comment characters.Note that in the Eclipse plugin, file comments will not be merged.
- Parameters:
commentLine
- the comment line
-
getFileCommentLines
-
accept
-