public class BeanTransformer extends ObjectModelTransformerToJava
Generates also a model initializer contract which permits you to interact with all selectedClasses of your model.
For example:
GeneratedBoat
Boat (extends GeneratedBoat)
GeneratedBoatHelper
BoatHelper (extends AbstractBoats)
|
| Modifier and Type | Field and Description |
|---|---|
protected BeanTransformerTagValues |
beanTagValues |
protected BeanTransformerContext |
context |
protected EugeneCoreTagValues |
coreTagValues |
protected com.google.common.collect.ImmutableSet<ObjectModelClass> |
helpers |
protected com.google.common.collect.ImmutableMap<ObjectModelClass,String> |
helpersNameTranslation |
protected EugeneJavaTagValues |
javaTemplatesTagValues |
builder, eugeneTagValuesoutputModel, outputProperties, outputTemplate, previousTransformerconfiguration, excludeTemplates, generatedPackages, model, resourcesHelperPROP_CLASS_LOADER, PROP_DEFAULT_PACKAGE, PROP_ENCODING, PROP_EXCLUDE_TEMPLATES, PROP_GENERATED_PACKAGES, PROP_I18N_GETTER_FILE, PROP_LAST_MODIFIED_SOURCE, PROP_OUTPUT_DIRECTORY, PROP_OVERWRITE, PROP_RESOURCE_DIRECTORY, PROP_VERBOSE, PROP_WRITER_REPORT| Constructor and Description |
|---|
BeanTransformer() |
addAnnotation, addAnnotation, addAnnotationParameter, addAttribute, addAttribute, addAttribute, addAttribute, addBlock, addComment, addConstant, addConstant, addConstantsFromDependency, addConstructor, addConstructor, addException, addException, addGeneratedAnnotation, addI18n, addImport, addImport, addImport, addInnerClassifier, addInterface, addInterface, addLiteral, addOperation, addOperation, addOperation, addParameter, addParameter, addStereotype, addTagValue, addTagValue, cloneAttribute, cloneClass, cloneClassifier, cloneClassifier, cloneEnumeration, cloneInterface, cloneOperation, cloneOperationSignature, cloneStereotypes, cloneTagValues, copyClassifier, createAbstractClass, createClass, createEnumeration, createInterface, debugOutputModel, generateI18nBlock, getConstantName, getConstantPrefix, getConstantPrefix, getFileInClassPath, getJavaBeanMethodName, getJavaBeanMethodName, getMethodName, getPackage, getPackage, initConstantPrefixFromModel, initOutputModel, initOutputTemplate, isInClassPath, isInClassPath, isInClassPath, setConstantPrefix, setDocumentation, setMaxMultiplicity, setMinMultiplicity, setNavigable, setOperationBody, setSuperClass, setSuperClass, storeServiceLoaderFile, toQualifiedNamestransform, transformFromClassifier, transformFromElement, transformFromEnumeration, transformFromInterfaceaddOutputProperty, applyTemplate, getDefaultPackageName, getOutputModel, getOutputProperties, getOutputTemplate, init, initPreviousTransformer, transformgetClassLoader, getConfiguration, getEncoding, getExcludeTemplates, getGeneratedPackages, getLastModifiedSource, getLog, getModel, getOverwrite, getProperties, getProperty, getProperty, getResourcesHelper, getWriterReport, isOverwrite, isVerbose, setConfiguration, setLog, setPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetI18nGetterFile, setI18nGetterFileprotected final EugeneJavaTagValues javaTemplatesTagValues
protected final BeanTransformerTagValues beanTagValues
protected final EugeneCoreTagValues coreTagValues
protected com.google.common.collect.ImmutableMap<ObjectModelClass,String> helpersNameTranslation
protected com.google.common.collect.ImmutableSet<ObjectModelClass> helpers
protected BeanTransformerContext context
public static boolean skipForInitializer(ObjectModelPackage aPackage, ObjectModelClass beanClass)
public void transformFromModel(ObjectModel model)
transformFromModel in class ObjectModelTransformer<ObjectModel>public void transformFromClass(ObjectModelClass input)
transformFromClass in class ObjectModelTransformer<ObjectModel>protected ObjectModelClass generateClass(ObjectModelClass input, String className, String abstractClassName)
protected ObjectModelClass generateGeneratedClass(ObjectModelPackage aPackage, ObjectModelClass input, String className, String mainClassName)
protected void generateHelper(ObjectModelClass aClass, String abstractClassName, String defaultClassName)
protected void generateGeneratedHelper(ObjectModelPackage aPackage, ObjectModelClass aClass, String typeName, String abstractClassName)
protected void generateGeneratedHelperConstructors(ObjectModelClass output, String typeName)
protected void generateGeneratedHelperCopyMethods(ObjectModelClass output, String typeName)
protected void generateGeneratedHelperPredicates(ObjectModelClass input, ObjectModelClass output, String typeName)
protected void generateGeneratedHelperFunctions(ObjectModelClass input, ObjectModelClass output, String typeName)
protected String getGeneratedHelperSuperClassName(ObjectModelPackage aPackage, ObjectModelClass aClass)
protected String getAttributeType(ObjectModelAttribute attr)
protected boolean notFoundInClassPath(ObjectModelClass input, String className)
protected void createProperty(ObjectModelClass output, ObjectModelAttribute attr, boolean usePCS, boolean generateBooleanGetMethods, boolean generateNotEmptyCollections)
protected List<ObjectModelAttribute> getProperties(ObjectModelClass input)
protected void createGetMethod(ObjectModelClass output, String attrName, String attrType, String methodPrefix, boolean generateLayzCode, String collectionImplementationType)
protected void createGetMethod(ObjectModelClass output, String attrName, String attrType, String methodPrefix)
protected void createGetChildMethod(ObjectModelClass output, String attrName, String attrType, String simpleType)
protected void createIsEmptyMethod(ObjectModelClass output, String attrName)
protected void createSizeMethod(ObjectModelClass output, String attrName)
protected void createAddChildMethod(ObjectModelClass output, String attrName, String attrType, String constantName, boolean usePCS)
protected void createAddAllChildrenMethod(ObjectModelClass output, String attrName, String attrType, String constantName, boolean usePCS)
protected void createRemoveChildMethod(ObjectModelClass output, String attrName, String attrType, String constantName, boolean usePCS)
protected void createRemoveAllChildrenMethod(ObjectModelClass output, String attrName, String attrType, String constantName, boolean usePCS)
protected void createContainsChildMethod(ObjectModelClass output, String attrName, String attrType, String constantName, boolean usePCS)
protected void createContainsAllChildrenMethod(ObjectModelClass output, String attrName, String attrType, String constantName)
protected void createSetMethod(ObjectModelClass output, String attrName, String attrType, String simpleType, String constantName, boolean usePCS)
protected void addSerializable(ObjectModelClass input, ObjectModelClass output, boolean interfaceFound)
protected boolean addInterfaces(ObjectModelClass input, ObjectModelClassifier output, String extraInterfaceName)
Serializable interface was found.input - the input model class to processoutput - the output generated classtrue if Serializable was found from input,
false otherwiseprotected void createPropertyChangeSupport(ObjectModelClass output)
protected void createGetChildMethod(ObjectModelClass output)
protected void generateI18nBlockAndConstants(ObjectModelPackage aPackage, ObjectModelClass input, ObjectModelClassifier output)
protected void addDefaultMethodForNoneBeanSuperClass(ObjectModelClass output, boolean usePCS, List<ObjectModelAttribute> properties)
protected String getGetterName(ObjectModelAttribute attribute, String attrName)
protected boolean canGenerateAbstractClass(ObjectModelClass aClass, String abstractClassName)
protected void createPropertyConstant(ObjectModelClassifier output, ObjectModelAttribute attr, String prefix, Set<String> constantNames)
protected String getAttributeName(ObjectModelAttribute attr)
protected String getAttributeTypeWithGeneric(ObjectModelAttribute attr)
protected boolean containsMultiple(List<ObjectModelAttribute> attributes)
Copyright © 2012–2020 Ultreia.io. All rights reserved.