net.noco.dtogen.transformer
Class ModelExtractor
java.lang.Object
net.noco.dtogen.transformer.ModelExtractor
- public class ModelExtractor
- extends java.lang.Object
Create the skeletons. Unlink from the QDox model as much as possible.
- Version:
- $Revision: 1.59 $
- Author:
- the_mindstorm(at)evolva(dot)ro
Method Summary |
java.util.Map |
extractModel()
Creates all internal structures representing the DTOs. |
private boolean |
fillAccessor(BeanPropertySkel bp)
|
private void |
fillBeanProperty(BeanPropertySkel bp,
java.util.Map skeletonIds)
|
private boolean |
fillElementType(BeanPropertySkel bp,
java.util.Map skeletonIds)
|
private boolean |
fillField(BeanPropertySkel bp,
java.util.Map skeletonIds)
|
private boolean |
fillKeyType(BeanPropertySkel bp,
java.util.Map skeletonIds)
|
private boolean |
fillMutator(BeanPropertySkel bp)
|
private java.lang.String |
getNewPropertyName(com.thoughtworks.qdox.model.BeanProperty bp,
java.lang.String fqn,
boolean prefix)
Solves the bean property name. |
private DTOClassSkel |
identifyExtends(java.lang.String className,
java.util.Map skeletons,
java.util.Map skeletonIds)
|
private BeanPropertySkel |
injectBeanProperty(java.util.Map propRepository,
DTOClassSkel skeleton,
com.thoughtworks.qdox.model.BeanProperty bp,
java.lang.String modelFqn,
boolean usePrefix,
java.lang.String tagName,
boolean isPK)
|
private java.lang.String |
moreVisible(java.lang.String initial,
java.lang.String newScope)
|
private java.lang.String |
resolveTypeMapping(java.util.Map mappings,
java.lang.String mapId,
java.lang.String type)
|
private void |
solveExternalReferences(DTOClassSkel skel,
com.thoughtworks.qdox.model.BeanProperty[] bps)
|
private void |
solveInternalReferences(DTOClassSkel skel,
DTOClassSkel referedSkel)
|
private void |
solveInternals(java.util.Map skeletons,
java.util.Map skeletonIds)
Map (key=dto fqn), Map (key=class id, value=fqn). |
private void |
solveOuterReferences(java.util.Map skeletons,
java.util.Map skeletonIds)
Map (key=dto fqn), Map (key=class id, value=fqn). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
L
private static final ILog L
NULL
private static final java.lang.Object NULL
MODIFIERS_ORDER
private static final java.util.Map MODIFIERS_ORDER
repository
private ModelRepository repository
classMap
private java.util.Map classMap
ModelExtractor
public ModelExtractor(ModelRepository repository)
extractModel
public java.util.Map extractModel()
- Creates all internal structures representing the DTOs.
- Returns:
- Map (key=dto fqn)
solveOuterReferences
private void solveOuterReferences(java.util.Map skeletons,
java.util.Map skeletonIds)
- Map (key=dto fqn), Map (key=class id, value=fqn).
solveExternalReferences
private void solveExternalReferences(DTOClassSkel skel,
com.thoughtworks.qdox.model.BeanProperty[] bps)
identifyExtends
private DTOClassSkel identifyExtends(java.lang.String className,
java.util.Map skeletons,
java.util.Map skeletonIds)
solveInternalReferences
private void solveInternalReferences(DTOClassSkel skel,
DTOClassSkel referedSkel)
injectBeanProperty
private BeanPropertySkel injectBeanProperty(java.util.Map propRepository,
DTOClassSkel skeleton,
com.thoughtworks.qdox.model.BeanProperty bp,
java.lang.String modelFqn,
boolean usePrefix,
java.lang.String tagName,
boolean isPK)
getNewPropertyName
private java.lang.String getNewPropertyName(com.thoughtworks.qdox.model.BeanProperty bp,
java.lang.String fqn,
boolean prefix)
- Solves the bean property name. The algo used is simple:
- if name parameter is defined than its value is returned
- the original name
solveInternals
private void solveInternals(java.util.Map skeletons,
java.util.Map skeletonIds)
- Map (key=dto fqn), Map (key=class id, value=fqn).
fillBeanProperty
private void fillBeanProperty(BeanPropertySkel bp,
java.util.Map skeletonIds)
fillElementType
private boolean fillElementType(BeanPropertySkel bp,
java.util.Map skeletonIds)
fillKeyType
private boolean fillKeyType(BeanPropertySkel bp,
java.util.Map skeletonIds)
fillAccessor
private boolean fillAccessor(BeanPropertySkel bp)
moreVisible
private java.lang.String moreVisible(java.lang.String initial,
java.lang.String newScope)
fillMutator
private boolean fillMutator(BeanPropertySkel bp)
fillField
private boolean fillField(BeanPropertySkel bp,
java.util.Map skeletonIds)
resolveTypeMapping
private java.lang.String resolveTypeMapping(java.util.Map mappings,
java.lang.String mapId,
java.lang.String type)
Copyright © 2004 Alexandru Popescu (a.k.a. the_mindstorm). All Rights Reserved.