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 Stringprivate final Map<String, AbstractJType> private final Stringprivate booleanprivate final ImplJSourcesprivate 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) booleanhasImport(AbstractJType type) (package private) booleanhasStaticImport(String name) (package private) booleanhasStaticImport(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) voidwrite(SourceFileWriter sourceFileWriter) Methods inherited from class org.jboss.jdeparser.BasicJCommentable
blockComment, lineComment, writeCommentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:JSourceFileAdd a type import to this source file.- Specified by:
_importin interfaceJSourceFile- Parameters:
type- the type to import- Returns:
- this source file
-
_import
Description copied from interface:JSourceFileAdd a type import to this source file.- Specified by:
_importin interfaceJSourceFile- Parameters:
type- the type to import- Returns:
- this source file
-
_import
Description copied from interface:JSourceFileAdd a type import to this source file.- Specified by:
_importin interfaceJSourceFile- Parameters:
type- the type to import- Returns:
- this source file
-
importStatic
Description copied from interface:JSourceFileAdd a static member import to this source file.- Specified by:
importStaticin interfaceJSourceFile- Parameters:
type- the type to import frommember- the member name- Returns:
- this source file
-
importStatic
Description copied from interface:JSourceFileAdd a static member import to this source file.- Specified by:
importStaticin interfaceJSourceFile- Parameters:
type- the type to import frommember- the member name- Returns:
- this source file
-
importStatic
Description copied from interface:JSourceFileAdd a static member import to this source file.- Specified by:
importStaticin interfaceJSourceFile- Parameters:
type- the type to import frommember- the member name- Returns:
- this source file
-
blankLine
Description copied from interface:JSourceFileAdd a blank line to this source file. If sorting is enabled, blank lines may be lost.- Specified by:
blankLinein interfaceJSourceFile- Returns:
- this source file
-
_class
Description copied from interface:JSourceFileAdd a class definition to this source file.- Specified by:
_classin interfaceJSourceFile- Parameters:
mods- the modifiersname- the class name- Returns:
- the class definition
-
_enum
Description copied from interface:JSourceFileAdd an enum definition to this source file.- Specified by:
_enumin interfaceJSourceFile- Parameters:
mods- the modifiersname- the enum name- Returns:
- the enum definition
-
_interface
Description copied from interface:JSourceFileAdd an interface definition to this source file.- Specified by:
_interfacein interfaceJSourceFile- Parameters:
mods- the modifiersname- the interface name- Returns:
- the interface definition
-
annotationInterface
Description copied from interface:JSourceFileAdd an annotation interface definition to this source file.- Specified by:
annotationInterfacein 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()
-