Class ClassWriter
java.lang.Object
de.hybris.bootstrap.codegenerator.AbstractImportProvider
de.hybris.bootstrap.codegenerator.ClassWriter
- All Implemented Interfaces:
CodeWriter
- Direct Known Subclasses:
AbstractDtoWriter,AbstractEnumWriter,AbstractResourceWriter,JaloClassWriter,ModelWriter,PackageInfoWriter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClassWriter(CodeGenerator gen, YExtension ext, String className) ClassWriter(CodeGenerator gen, YExtension ext, String className, String packageName) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(String annotation) protected final voidprotected voidvoidaddConstantDeclaration(CodeWriter writer) voidaddConstantDeclaration(String declaration) voidvoidaddDeclaration(CodeWriter writer) voidaddDeclaration(String declaration) voidaddDeclaration(String declaration, String typeToImport) voidaddInterface(String interfaceClass) voidaddMethod(MethodWriter writer) static StringassembleAbstractClassName(CodeGenerator gen, YExtension ext, String name) static StringassembleClassName(CodeGenerator gen, YExtension ext, String name) booleancontainsAnnotation(String annotationToLookup) protected voidfill()static StringfirstLetterUpperCase(String word) protected ExtensionInfogetInfo()intbooleanprotected voidprocessAnnotations(JavaFile file) voidremoveSelfImport(List<String> ret) voidsetClassToExtend(String clazz) protected voidsetCopyright(String copyright) voidsetJavadoc(String javadoc) voidsetModifiers(int modifiers) voidsetPackageName(String packageName) voidsetVisibility(Visibility visibility) protected List<MethodWriter>sortMethods(List<MethodWriter> methods) voidprotected voidwriteMethods(JavaFile file) protected voidwriteSignature(JavaFile file) Methods inherited from class de.hybris.bootstrap.codegenerator.AbstractImportProvider
addRequiredImport
-
Field Details
-
GENERATED_NOTICE
-
-
Constructor Details
-
ClassWriter
-
ClassWriter
-
-
Method Details
-
assembleAbstractClassName
-
assembleClassName
-
firstLetterUpperCase
-
isGeneratePartOf
public boolean isGeneratePartOf() -
getExtension
-
getGenerator
-
getInfo
-
fill
protected void fill() -
write
-
addAnnotations
protected void addAnnotations() -
processAnnotations
-
writeMethods
-
writeSignature
-
sortMethods
-
getPackageName
- Returns:
- the packageName
-
setPackageName
- Parameters:
packageName- the packageName to set
-
getCopyright
- Returns:
- the copyright
-
setCopyright
- Parameters:
copyright- the copyright to set
-
getJavadoc
- Returns:
- the javadoc
-
setJavadoc
- Parameters:
javadoc- the javadoc to set
-
getClassName
- Returns:
- the className
-
getClassToExtend
-
setClassToExtend
-
getInterfaces
-
addInterface
-
getRequiredImports
- Overrides:
getRequiredImportsin classAbstractImportProvider- Returns:
- the imports
-
removeSelfImport
-
addMethod
-
getMethods
-
getVisibility
- Returns:
- the visibility
-
setVisibility
- Parameters:
visibility- the visibility to set
-
addConstructor
-
getConstructors
- Returns:
- the constructors
-
addDeclaration
-
addDeclaration
-
getConstantDeclarations
- Returns:
- the constant declarations
-
addConstantDeclaration
-
addConstantDeclaration
-
containsAnnotation
-
addAnnotationIfDeprecated
-
addAnnotation
-
getAnnotations
-
addDeclaration
-
getDeclarations
- Returns:
- the declarations
-
getModifiers
public int getModifiers()- Returns:
- the modifiers
-
setModifiers
public void setModifiers(int modifiers) - Parameters:
modifiers- the modifiers to set
-