public abstract class AbstractAnalyzer<T> extends Object implements com.github.jmodel.api.Analyzer
| Constructor and Description |
|---|
AbstractAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
build(com.github.jmodel.api.Model sourceModel,
Map<String,com.github.jmodel.api.Field> fieldPathMap,
Map<String,com.github.jmodel.api.Model> modelPathMap,
T node,
Boolean isConstruction) |
protected abstract void |
buildModel(com.github.jmodel.api.Model sourceModel,
Map<String,com.github.jmodel.api.Field> fieldPathMap,
Map<String,com.github.jmodel.api.Model> modelPathMap,
String nodeName,
T node)
Model will be built base on source object.
|
protected abstract T |
getSubNode(T node,
String subNodeName) |
protected abstract void |
populateSubModel(T subNode,
com.github.jmodel.api.Model subModel,
com.github.jmodel.api.Model subSubModel) |
protected abstract void |
setFieldValue(T sourceNode,
com.github.jmodel.api.Field field)
Different ways to set value for different model, e.g.
|
protected void |
setValueOfFields(com.github.jmodel.api.Model sourceModel,
Map<String,com.github.jmodel.api.Field> fieldPathMap,
Map<String,com.github.jmodel.api.Model> modelPathMap,
T node)
Set the value of fields for a model.
|
protected void build(com.github.jmodel.api.Model sourceModel,
Map<String,com.github.jmodel.api.Field> fieldPathMap,
Map<String,com.github.jmodel.api.Model> modelPathMap,
T node,
Boolean isConstruction)
protected void setValueOfFields(com.github.jmodel.api.Model sourceModel,
Map<String,com.github.jmodel.api.Field> fieldPathMap,
Map<String,com.github.jmodel.api.Model> modelPathMap,
T node)
sourceModel - source modelfieldPathMap - help to set valuemodelPathMap - help to set valuenode - a nodeprotected abstract void buildModel(com.github.jmodel.api.Model sourceModel,
Map<String,com.github.jmodel.api.Field> fieldPathMap,
Map<String,com.github.jmodel.api.Model> modelPathMap,
String nodeName,
T node)
sourceModel - source modelfieldPathMap - help to set valuemodelPathMap - help to set valuenodeName - the name of nodenode - a nodeprotected abstract void setFieldValue(T sourceNode, com.github.jmodel.api.Field field)
sourceNode - source nodefield - a fieldprotected abstract void populateSubModel(T subNode, com.github.jmodel.api.Model subModel, com.github.jmodel.api.Model subSubModel)
Copyright © 2016. All rights reserved.