Module io.github.mmm.bean.generator
Package io.github.mmm.bean.generator
Class BeanMetadataContainerInterface
java.lang.Object
io.github.mmm.bean.generator.BeanMetadataContainer
io.github.mmm.bean.generator.BeanMetadataContainerInterface
BeanMetadataContainer for an interface.- Since:
- 1.0.0
-
Field Summary
Fields inherited from class io.github.mmm.bean.generator.BeanMetadataContainer
beanType, virtual -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisNonAbstractInterface(Class<? extends io.github.mmm.bean.WritableBean> beanClass) voidWrites the entire Java file.voidWrites the class body.voidwriteClassDeclaration(Writer writer) Writes the class declaration.voidwriteConstructors(Writer writer) Writes the constructor(s).voidwriteFields(Writer writer) Writes the fields.voidwriteImports(Writer writer) Writes the import statements.voidwriteInstantiation(Writer writer, String beanClassVariable) Writes the entire Java file.voidwriteMethods(Writer writer) Writes the methods.voidwritePackageDeclaration(Writer writer) Writes the package declaration.Methods inherited from class io.github.mmm.bean.generator.BeanMetadataContainer
getBeanType, isVirtual
-
Method Details
-
write
Writes the entire Java file.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writePackageDeclaration
Writes the package declaration.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeImports
Writes the import statements.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeClassDeclaration
Writes the class declaration.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeFields
Writes the fields.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeConstructors
Writes the constructor(s).- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeMethods
Writes the methods.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeBody
Writes the class body.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeInstantiation
Description copied from class:BeanMetadataContainerWrites the entire Java file.- Specified by:
writeInstantiationin classBeanMetadataContainer- Parameters:
writer- theWriter.beanClassVariable- the variable of theBeanClassto potentially pass to theConstructor.- Throws:
IOException- on error.
-
isNonAbstractInterface
public static boolean isNonAbstractInterface(Class<? extends io.github.mmm.bean.WritableBean> beanClass) - Parameters:
beanClass- theClassreflecting theWritableBeanto check.- Returns:
trueif the givenClassan interfaceand is not annotated withAbstractInterface.
-
of
public static BeanMetadataContainerInterface of(Class<? extends io.github.mmm.bean.WritableBean> beanClass) - Parameters:
beanClass- theClassreflecting theWritableBeanto get metadata for.- Returns:
- the
BeanMetadataContainerInterfacefor the givenClassornullif not anon-abstract interface.
-