public class JavaBeanClass extends AbstractCodeGeneratorClass implements CodeGeneratorClass
AbstractCodeGeneratorClass.Signature, AbstractCodeGeneratorClass.Signatures| Modifier and Type | Field and Description |
|---|---|
protected int |
elementTypeSetnull |
ACCESS_SECTION, ADD, arrKeywords, attrList, beanElement, BODY_SECTION, BOOLEAN, CLASS, className, config, CONSTRUCTOR_SECTION, DECL_SECTION, EQUALS_SECTION, FINAL, fullClassName, generatedNewMethods, GETTER, GETTERINDEXED, GETTERLIST, HASHCODE_SECTION, HEADER_SECTION, IMPORT, INITIALIZE_SECTION, INT, MAX_DUMP_TREE_LINE_COUNT, MAXVALUE, mdd, metaElement, NEW_METHOD_SECTION, OTHER, PACKAGE, packageName, prefixGuesser, PRIVATE, PROTECTED, PUBLIC, REMOVE, rootBeanElement, SETTER, SETTERINDEXED, SIZE, STATIC, STRING, TRAILER_SECTION, VOID| Modifier and Type | Method and Description |
|---|---|
protected void |
beginAttrIterator(String attr,
org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String elementName) |
protected void |
beginAttrProcessing(String nodeName) |
protected void |
declareAttrsForRead(String nodeName) |
protected void |
declareLogger() |
protected String |
declareQName(String namespaceUri,
String localPart,
String prefix)
Declare the QNAME as a constant.
|
void |
genAccessors() |
protected void |
genAllParts() |
protected void |
genCallMethodOnBeans(String methodParams) |
protected void |
genCallMethodOnSubBeans(String methodName) |
void |
genChildBeans() |
void |
genClassName(int out) |
void |
genConstructor() |
void |
genElementPositions() |
void |
genEqualsHashCode() |
void |
generate(OutputStream out,
MetaDD mdd)
Generate the java code in the out stream, using the optional
metaDD bean graph.
|
void |
genExtendBaseBean() |
protected void |
genExtendBaseBeanConstructor()
Whenever we create a constructor, call this method first.
|
protected void |
genFetchXMLEventReader() |
protected void |
genFinder(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
GraphNode startingGraphNode,
String attr,
String keyName,
String returnType,
String nameToFind,
String selectorXPath,
String fieldXPath,
boolean isListFindExpr) |
protected void |
genFinder(GraphNode startingGraphNode,
org.netbeans.modules.schema2beansdev.BeanBuilder.Finder finder) |
protected void |
genFinder(GraphNode startingGraphNode,
String selectorXPath,
String fieldXPath,
boolean isListFindExpr) |
void |
genFinishClass(int out) |
void |
genHasChanged() |
void |
genHeader(int out) |
void |
genImports(int out) |
protected void |
genMadeChange() |
void |
genName() |
protected void |
genNewEvent(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String index,
String oldValue,
String newValue,
String type) |
void |
genPackage(int out) |
void |
genPrintXML() |
protected void |
genProcessDocType(boolean java5) |
void |
genPropertiesByName() |
void |
genPropertyEvents() |
protected void |
genReadAttr(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String nodeName) |
protected void |
genReadAttr(String attr,
String type,
String dtdName,
String nodeName,
SchemaRep.WhiteSpace ws,
boolean isIndexed,
String addMethod,
boolean isScalar,
SchemaRep.EncodingStyle style) |
protected boolean |
genReadType(String type,
String var,
String expr,
boolean isIndexed,
String addMethod,
boolean isScalar,
SchemaRep.EncodingStyle style) |
void |
genSpecialTypes()
Generate stuff for special types as needed.
|
void |
genStoreEvents() |
void |
genToString() |
void |
genTrailer(int out) |
void |
genTransactions() |
protected void |
genUpdateNamespaces(String namespaceMapName,
String firstNamespaceVarName) |
void |
genValidate() |
protected void |
genValidateFail(String detail,
String name,
boolean quoteDetail,
ValidateException.FailureType ft,
JavaWriter out) |
void |
genVetoable() |
protected void |
genWriteAttr(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a) |
protected void |
genWriteAttr(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String varName) |
protected void |
genWriteType(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String varName,
boolean isAttribute) |
void |
genXMLIO() |
protected boolean |
hasDeepCopyConstructor() |
protected void |
outWrite(String text) |
void |
setInvalidPropertyNames(Map invalidNames)
The generator should put in an entry for every name that is
invalid to use as a property name.
|
addProperty, beanTree, begin, beginNoI18N, comment, comment, comment, commonBeanType, countNumberOfNonAttributeProperties, countNumberOfNonAttributePropertiesRecurse, cr, dumpAttributes, dumpBeanTree, dumpBeanTree, end, end, endNoI18N, eol, eol, eolNoI18N, findAttributeOwners, findProperty, firstInCommaSeparatedList, gen, gen, gen, gen, gen, gen, gen, gen, gen, gen, gen, gen, genCopy, genCopyWillCopy, gencr, gencr, gencr, gencr, gencr, gencr, gencr, gencrNoI18N, gencrNoI18N, genDefaultsAccessable, geneol, generate, generateDelegator, generateDelegator, generateDelegatorConstructors, generateSwitches, genforprop, genForRestrictions, gengetprop, gengetpropbyname, genInvalidName, genNewDefault, genNewMethod, genNewMethod, genResetMutuallyExclusive, genRethrowExceptions, genSetValP, genSetValue, gensig1, gensig2, gentab, genValidateIf, genValidateProperties, genWhiteSpaceRestriction, get, getDefaultNamespace, getGeneratedMethods, geti, getidx, getMetaElement, getMetaElement, getMetaElement, getMetaProperty, getMetaProperty, getPropertyList, getRootClassName, getSignatures, getTypeFullClassName, getTypeFullClassName, init, isCloneCallNeededOnType, isMutableType, isMutuallyExclusive, isTypeQName, noI18N, parentBeanType, PC, PO, printComment, printGenBuffers, printSchema, resetGenBuffers, select, setDefaultNamespace, setIndent, setPackageName, setPrefixGuesser, setRootBeanElement, sp, tabIn, testIfPropertyNotSet, testIfPropertySet, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddProperty, dumpBeanTree, generate, generateDelegator, getGeneratedMethods, getPropertyList, setDefaultNamespace, setIndent, setPackageName, setPrefixGuesser, setRootBeanElementprotected final int elementTypeSetnull
public void generate(OutputStream out, MetaDD mdd) throws IOException
generate in interface CodeGeneratorClassgenerate in class AbstractCodeGeneratorClassIOExceptionprotected void genAllParts()
throws IOException
IOExceptionprotected void genMadeChange()
throws IOException
IOExceptionprotected void genExtendBaseBeanConstructor()
throws IOException
IOExceptionpublic void genHeader(int out)
throws IOException
IOExceptionpublic void genPackage(int out)
public void genImports(int out)
public void genClassName(int out)
throws IOException
IOExceptionpublic void genConstructor()
throws IOException
IOExceptionpublic void genAccessors()
throws IOException
IOExceptionprotected void genFinder(GraphNode startingGraphNode, org.netbeans.modules.schema2beansdev.BeanBuilder.Finder finder) throws IOException
IOExceptionprotected void genFinder(GraphNode startingGraphNode, String selectorXPath, String fieldXPath, boolean isListFindExpr) throws IOException
IOExceptionprotected void genFinder(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
GraphNode startingGraphNode,
String attr,
String keyName,
String returnType,
String nameToFind,
String selectorXPath,
String fieldXPath,
boolean isListFindExpr)
throws IOException
IOExceptionpublic void genXMLIO()
throws IOException
IOExceptionprotected void genFetchXMLEventReader()
throws IOException
IOExceptionprotected String declareQName(String namespaceUri, String localPart, String prefix) throws IOException
IOExceptionprotected void declareLogger()
throws IOException
IOExceptionprotected void genUpdateNamespaces(String namespaceMapName, String firstNamespaceVarName) throws IOException
IOExceptionprotected void genWriteAttr(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a)
throws IOException
IOExceptionprotected void genWriteAttr(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String varName)
throws IOException
IOExceptionprotected void genWriteType(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String varName,
boolean isAttribute)
throws IOException
IOExceptionprotected void beginAttrProcessing(String nodeName) throws IOException
IOExceptionprotected void genReadAttr(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String nodeName)
throws IOException
IOExceptionprotected void genReadAttr(String attr, String type, String dtdName, String nodeName, SchemaRep.WhiteSpace ws, boolean isIndexed, String addMethod, boolean isScalar, SchemaRep.EncodingStyle style) throws IOException
IOExceptionprotected boolean genReadType(String type, String var, String expr, boolean isIndexed, String addMethod, boolean isScalar, SchemaRep.EncodingStyle style) throws IOException
IOExceptionprotected void declareAttrsForRead(String nodeName) throws IOException
IOExceptionpublic void genPrintXML()
throws IOException
IOExceptionprotected void outWrite(String text) throws IOException
IOExceptionpublic void genSpecialTypes()
throws IOException
IOExceptionpublic void genValidate()
throws IOException
IOExceptionprotected void genValidateFail(String detail, String name, boolean quoteDetail, ValidateException.FailureType ft, JavaWriter out) throws IOException
genValidateFail in class AbstractCodeGeneratorClassIOExceptionpublic void genPropertyEvents()
throws IOException
IOExceptionprotected void genCallMethodOnBeans(String methodParams) throws IOException
IOExceptionpublic void genStoreEvents()
throws IOException
IOExceptionpublic void genVetoable()
throws IOException
IOExceptionpublic void genElementPositions()
throws IOException
IOExceptionprotected void genProcessDocType(boolean java5)
throws IOException
IOExceptionpublic void genTransactions()
throws IOException
IOExceptionprotected void genCallMethodOnSubBeans(String methodName) throws IOException
IOExceptionpublic void genPropertiesByName()
throws IOException
IOExceptionpublic void genEqualsHashCode()
throws IOException
IOExceptionpublic void genHasChanged()
throws IOException
IOExceptionpublic void genChildBeans()
throws IOException
IOExceptionpublic void genName()
throws IOException
IOExceptionpublic void genToString()
throws IOException
IOExceptionpublic void genExtendBaseBean()
throws IOException
IOExceptionpublic void genTrailer(int out)
public void genFinishClass(int out)
public void setInvalidPropertyNames(Map invalidNames)
CodeGeneratorClasssetInvalidPropertyNames in interface CodeGeneratorClassinvalidNames - is a
Mapprotected void beginAttrIterator(String attr, org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a, String elementName) throws IOException
IOExceptionprotected void genNewEvent(org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass.Property a,
String index,
String oldValue,
String newValue,
String type)
throws IOException
IOExceptionprotected boolean hasDeepCopyConstructor()
hasDeepCopyConstructor in class AbstractCodeGeneratorClassCopyright © 2017. All Rights Reserved.