public abstract class JavaFile extends Object
Modifier | Constructor and Description |
---|---|
protected |
JavaFile(Path path,
String encoding) |
Modifier and Type | Method and Description |
---|---|
void |
addClassType(ClassType classType)
Add a ClassType to the current list of class types.
|
void |
addImportType(ImportType importType)
Add an ImportType to the current imports.
|
ClassType |
getClassType()
Get the name of this class.
|
List<ClassType> |
getClassTypes()
Get the names of the classes in this file.
|
String |
getEncoding()
Gets the encoding attribute of the JavaFile object
|
Set<ImportType> |
getImportTypes()
Get the imported packages/files that this package has.
|
PackageType |
getPackageType()
Get the package of this class.
|
Path |
getPath()
Gets the filename attribute of the JavaFile object
|
void |
setClassType(ClassType classType)
Set the name of this class.
|
void |
setPackageType(PackageType packageType)
Set the PackageType of this class.
|
public Set<ImportType> getImportTypes()
public ClassType getClassType()
public PackageType getPackageType()
public void addClassType(ClassType classType)
public void addImportType(ImportType importType)
public void setClassType(ClassType classType)
public void setPackageType(PackageType packageType)
public Path getPath()
public String getEncoding()
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.