Package org.jboss.jdeparser
Class ImplJSourceFile
java.lang.Object
org.jboss.jdeparser.BasicJCommentable
org.jboss.jdeparser.ImplJSourceFile
- All Implemented Interfaces:
JCommentable
,JSourceFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArrayList<ClassFileContent>
private final String
private final Map<String,
AbstractJType> private final String
private boolean
private final ImplJSources
private final Map<String,
StaticRefJExpr> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a class definition to this source file.Add an enum definition to this source file.Add a type import to this source file.Add a type import to this source file.Add a type import to this source file._interface
(int mods, String name) Add an interface definition to this source file.private <C extends ClassFileContent>
Cadd
(C item) annotationInterface
(int mods, String name) Add an annotation interface definition to this source file.Add a blank line to this source file.private void
(package private) String
(package private) String
(package private) ImplJSources
(package private) boolean
(package private) boolean
hasImport
(AbstractJType type) (package private) boolean
hasStaticImport
(String name) (package private) boolean
hasStaticImport
(String name, AbstractJType enclosingType) importStatic
(Class<?> type, String member) Add a static member import to this source file.importStatic
(String type, String member) Add a static member import to this source file.importStatic
(JType type, String member) Add a static member import to this source file.(package private) void
write
(SourceFileWriter sourceFileWriter) Methods inherited from class org.jboss.jdeparser.BasicJCommentable
blockComment, lineComment, writeComments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
-
Field Details
-
sources
-
imports
-
staticImports
-
-
packageName
-
fileName
-
packageWritten
private boolean packageWritten
-
-
Constructor Details
-
ImplJSourceFile
ImplJSourceFile(ImplJSources sources, String packageName, String fileName)
-
-
Method Details
-
add
-
checkPackage
private void checkPackage() -
hasImport
-
hasImport
-
hasStaticImport
-
hasStaticImport
-
_import
Description copied from interface:JSourceFile
Add a type import to this source file.- Specified by:
_import
in interfaceJSourceFile
- Parameters:
type
- the type to import- Returns:
- this source file
-
_import
Description copied from interface:JSourceFile
Add a type import to this source file.- Specified by:
_import
in interfaceJSourceFile
- Parameters:
type
- the type to import- Returns:
- this source file
-
_import
Description copied from interface:JSourceFile
Add a type import to this source file.- Specified by:
_import
in interfaceJSourceFile
- Parameters:
type
- the type to import- Returns:
- this source file
-
importStatic
Description copied from interface:JSourceFile
Add a static member import to this source file.- Specified by:
importStatic
in interfaceJSourceFile
- Parameters:
type
- the type to import frommember
- the member name- Returns:
- this source file
-
importStatic
Description copied from interface:JSourceFile
Add a static member import to this source file.- Specified by:
importStatic
in interfaceJSourceFile
- Parameters:
type
- the type to import frommember
- the member name- Returns:
- this source file
-
importStatic
Description copied from interface:JSourceFile
Add a static member import to this source file.- Specified by:
importStatic
in interfaceJSourceFile
- Parameters:
type
- the type to import frommember
- the member name- Returns:
- this source file
-
blankLine
Description copied from interface:JSourceFile
Add a blank line to this source file. If sorting is enabled, blank lines may be lost.- Specified by:
blankLine
in interfaceJSourceFile
- Returns:
- this source file
-
_class
Description copied from interface:JSourceFile
Add a class definition to this source file.- Specified by:
_class
in interfaceJSourceFile
- Parameters:
mods
- the modifiersname
- the class name- Returns:
- the class definition
-
_enum
Description copied from interface:JSourceFile
Add an enum definition to this source file.- Specified by:
_enum
in interfaceJSourceFile
- Parameters:
mods
- the modifiersname
- the enum name- Returns:
- the enum definition
-
_interface
Description copied from interface:JSourceFile
Add an interface definition to this source file.- Specified by:
_interface
in interfaceJSourceFile
- Parameters:
mods
- the modifiersname
- the interface name- Returns:
- the interface definition
-
annotationInterface
Description copied from interface:JSourceFile
Add an annotation interface definition to this source file.- Specified by:
annotationInterface
in interfaceJSourceFile
- Parameters:
mods
- the modifiersname
- the annotation interface name- Returns:
- the annotation interface definition
-
getPackageName
String getPackageName() -
getFileName
String getFileName() -
write
- Throws:
IOException
-
getSources
ImplJSources getSources()
-