public abstract class JavaDataModelDriver extends Object
To enhance Java model class generator, clients can implement this
and put the class name in
META-INF/services/com.asakusafw.dmdl.java.spi.JavaDataModelDriver.
All default implementation will do nothing.
| Constructor and Description |
|---|
JavaDataModelDriver() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateResources(EmitContext context,
ModelDeclaration model)
Generates any resources (includes source programs) for the model.
|
List<FieldDeclaration> |
getFields(EmitContext context,
ModelDeclaration model)
Returns the field declarations to mixin to the model.
|
List<Type> |
getInterfaces(EmitContext context,
ModelDeclaration model)
Returns the interface types to implement to the model.
|
List<Annotation> |
getMemberAnnotations(EmitContext context,
PropertyDeclaration property)
Returns the type annotations to attach to the property.
|
List<Annotation> |
getMemberAnnotations(EmitContext context,
PropertyReferenceDeclaration reference)
Returns the type annotations to attach to the reference.
|
List<MethodDeclaration> |
getMethods(EmitContext context,
ModelDeclaration model)
Returns the method declarations to mixin to the model.
|
List<Annotation> |
getTypeAnnotations(EmitContext context,
ModelDeclaration model)
Returns the type annotations to attach to the model.
|
public void generateResources(EmitContext context, ModelDeclaration model) throws IOException
context - the attached contextmodel - target modelIOException - if failed to generate resourcespublic List<Type> getInterfaces(EmitContext context, ModelDeclaration model) throws IOException
context - the attached contextmodel - target modelIOException - if failed to create other modelspublic List<FieldDeclaration> getFields(EmitContext context, ModelDeclaration model) throws IOException
context - the attached contextmodel - target modelIOException - if failed to create other modelspublic List<MethodDeclaration> getMethods(EmitContext context, ModelDeclaration model) throws IOException
context - the attached contextmodel - target modelIOException - if failed to create other modelspublic List<Annotation> getTypeAnnotations(EmitContext context, ModelDeclaration model) throws IOException
context - the attached contextmodel - target modelIOException - if failed to create other modelspublic List<Annotation> getMemberAnnotations(EmitContext context, PropertyDeclaration property) throws IOException
context - the attached contextproperty - target propertyIOException - if failed to create other modelspublic List<Annotation> getMemberAnnotations(EmitContext context, PropertyReferenceDeclaration reference) throws IOException
context - the attached contextreference - target referenceIOException - if failed to create other modelsCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.