Module io.github.mmm.bean.generator
Package io.github.mmm.bean.generator
Class BeanInterfaceMetadata
- java.lang.Object
-
- io.github.mmm.bean.generator.BeanMetadata
-
- io.github.mmm.bean.generator.BeanInterfaceMetadata
-
public class BeanInterfaceMetadata extends BeanMetadata
Collector for introspection data ofbeans.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class io.github.mmm.bean.generator.BeanMetadata
beanType, virtual
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanisNonAbstractInterface(Class<? extends WritableBean> beanClass)static BeanInterfaceMetadataof(Class<? extends WritableBean> beanClass)voidwrite(Writer writer)Writes the entire Java file.voidwriteBody(Writer writer)Writes 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.BeanMetadata
getBeanType, isVirtual
-
-
-
-
Method Detail
-
write
public void write(Writer writer) throws IOException
Writes the entire Java file.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writePackageDeclaration
public void writePackageDeclaration(Writer writer) throws IOException
Writes the package declaration.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeImports
public void writeImports(Writer writer) throws IOException
Writes the import statements.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeClassDeclaration
public void writeClassDeclaration(Writer writer) throws IOException
Writes the class declaration.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeFields
public void writeFields(Writer writer) throws IOException
Writes the fields.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeConstructors
public void writeConstructors(Writer writer) throws IOException
Writes the constructor(s).- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeMethods
public void writeMethods(Writer writer) throws IOException
Writes the methods.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeBody
public void writeBody(Writer writer) throws IOException
Writes the class body.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeInstantiation
public void writeInstantiation(Writer writer, String beanClassVariable) throws IOException
Description copied from class:BeanMetadataWrites the entire Java file.- Specified by:
writeInstantiationin classBeanMetadata- Parameters:
writer- theWriter.beanClassVariable- the variable of theBeanClassto potentially pass to theConstructor.- Throws:
IOException- on error.
-
isNonAbstractInterface
public static boolean isNonAbstractInterface(Class<? extends WritableBean> beanClass)
- Parameters:
beanClass- theClassreflecting theWritableBeanto check.- Returns:
trueif the givenClassan interfaceand is not annotated withAbstractInterface.
-
of
public static BeanInterfaceMetadata of(Class<? extends WritableBean> beanClass)
- Parameters:
beanClass- theClassreflecting theWritableBeanto get metadata for.- Returns:
- the
BeanInterfaceMetadatafor the givenClassornullif not anon-abstract interface.
-
-