| java.lang.Object org.netbeans.modules.schema2beansdev.AbstractCodeGeneratorClass
All known Subclasses: org.netbeans.modules.schema2beansdev.BeanClass, org.netbeans.modules.schema2beansdev.JavaBeanClass,
AbstractCodeGeneratorClass | abstract public class AbstractCodeGeneratorClass (Code) | | |
Inner Class :static class Property | |
Inner Class :class PropertyVisitor | |
Inner Class :class NamePropertyVisitor extends PropertyVisitor | |
Inner Class :protected static class Signature | |
Inner Class :protected static class Signatures | |
Method Summary | |
protected void | PC() | protected void | PO() | public Property | addProperty(String name, String dtdName, String namespace, GraphNode node, GraphLink l, String classType, int nestedLevel, int eltInstance, int groupInstance, int type, boolean ored, AttrProp[] propAttributes, String constName, String defaultValue, boolean directChild, List extraData, boolean isUnion) This method is called by the BeanBuilder to register a new property
on this bean class. | protected int | beanTree(GraphLink l, StringBuffer str, String indent, String indentBy, int lineCount) | protected void | begin() | protected void | beginNoI18N() | protected void | comment() | protected void | comment(String s) | protected void | comment(String s, String s2) | protected String | commonBeanType() All generated beans are at least this type. | protected int | countNumberOfNonAttributeProperties() | protected int | countNumberOfNonAttributePropertiesRecurse(BeanBuilder.BeanElement be) | protected void | cr() | protected int | dumpAttributes(GraphNode elt, StringBuffer str, String indent, int lineCount) | public void | dumpBeanTree(java.io.Writer out, String indent, String indentBy) | protected int | dumpBeanTree(BeanBuilder.BeanElement be, StringBuffer str, String indent, String indentBy, int lineCount) | protected void | end() | protected void | end(boolean cr) | protected void | endNoI18N() | protected void | eol() | protected void | eol(boolean cr) | protected void | eolNoI18N() | protected void | findAttributeOwners() Once all properties have been added to this Bean, call this method
to figure out for attribute property who it's owner is. | protected Property | findProperty(AttrProp attr) | protected static String | firstInCommaSeparatedList(String lst) | protected void | gen(String s) | protected void | gen(StringBuffer s) | protected void | gen(String s1, String s2) | protected void | gen(String s1, String s2, String s3) | protected void | gen(int a) | protected void | gen(int a, String s) | protected void | gen(int a, String s, String s2) | protected void | gen(int a, int b, String s, String s2) | protected void | gen(int a, int b, String s) | protected void | gen(int a, int b, int c, String s) | protected void | gen(int a, int b, int c, int d, String s) | protected void | gen(Signature sig) | protected void | genCopy(String src, Property a, String justData) | protected boolean | genCopyWillCopy(Property a) | protected void | genDefaultsAccessable(Property a) | protected void | genForRestrictions(Property a, String attr) | protected void | genInvalidName(String var) | protected void | genNewDefault(Property prop, boolean wantConcreteType) | protected String | genNewMethod(String abstractType, String concreteType) | protected String | genNewMethod(String abstractType, String concreteType, String concreteFullTypeName) Generate a method that will get a new instance of some type. | protected void | genResetMutuallyExclusive(Property a, boolean genTest) Generate commands for resetting the mutually exclusive properties,
only if isMutuallyExclusive(a) returns true. | protected void | genRethrowExceptions(List exceps) | protected void | genSetValP(boolean b, String s1, String s2) | protected void | genSetValue(boolean isScalar, String classType) | abstract protected void | genValidateFail(String detail, String name, boolean quoteDetail, ValidateException.FailureType ft, JavaWriter out) | protected void | genValidateIf(String test, String name, ValidateException.FailureType ft, JavaWriter out) | protected void | genValidateProperties() | protected void | genWhiteSpaceRestriction(SchemaRep.WhiteSpace ws, String var, String type) | protected void | gencr(String s) | protected void | gencr(String s, String s2) | protected void | gencr(int a, String s) | protected void | gencr(int a, String s, String s2) | protected void | gencr(int a, int b, String s, String s2) | protected void | gencr(int a, int b, String s) | protected void | gencr(int a, int b, int c, String s) | protected void | gencrNoI18N(String s) | protected void | gencrNoI18N(String s, String s2) | protected void | geneol(String s) | public void | generate(String filename, MetaDD mdd) Generate the java code in the out stream, using the optional
metaDD bean graph. | abstract public void | generate(OutputStream out, MetaDD mdd) | public void | generateDelegator(OutputStream out, MetaDD mdd, String delegatorClassName, String delegatorPackageName) | protected void | generateDelegator(JavaWriter.Method method, String delegatorClassName) | protected void | generateDelegatorConstructors(String delegatorClassName) | protected void | generateSwitches() | protected void | genforprop() | protected void | gengetprop() | protected void | gengetpropbyname() | protected void | gensig1(String s) | protected void | gensig2(String s) | protected void | gentab(int n) | protected void | get(String s) | public String | getDefaultNamespace() | public Collection | getGeneratedMethods() | protected MetaElement | getMetaElement(BeanBuilder.BeanElement be) | protected MetaElement | getMetaElement(Property prop) | protected MetaElement | getMetaElement(String dtdName, String namespace) | protected MetaProperty | getMetaProperty(Property prop) | protected MetaProperty | getMetaProperty(String name) | public List | getPropertyList() | protected String | getRootClassName() | protected Signatures | getSignatures(Property a) | protected String | getTypeFullClassName(Property a) | protected String | getTypeFullClassName(Property a, String typeName) | protected void | geti(String s) | protected void | getidx(String s, boolean b) | protected boolean | hasDeepCopyConstructor() | protected void | init(BeanBuilder.BeanElement be, GenBeans.Config config) | protected boolean | isCloneCallNeededOnType(Property prop) | protected boolean | isMutableType(Property prop) | protected boolean | isMutuallyExclusive(Property a) | protected boolean | isTypeQName(String type) | protected void | noI18N() | protected String | parentBeanType() | protected void | printComment(String indent) | protected void | printGenBuffers(OutputStream out) | protected void | printSchema() Send the schema to the current output channel. | protected void | resetGenBuffers() | protected void | select(int o) | public void | setDefaultNamespace(String ns) | public void | setIndent(String indent) | public void | setPackageName(String n) | public void | setPrefixGuesser(PrefixGuesser guesser) | public void | setRootBeanElement(BeanBuilder.BeanElement element) | protected void | sp() | protected void | tabIn() | protected String | testIfPropertyNotSet(Property prop) | protected String | testIfPropertySet(Property prop) | public String | toString() |
ACCESS_SECTION | protected int ACCESS_SECTION(Code) | | |
ADD | final protected static Signature.TypeOfMethod ADD(Code) | | |
BODY_SECTION | protected int BODY_SECTION(Code) | | |
BOOLEAN | final protected static int BOOLEAN(Code) | | |
CLASS | final protected static int CLASS(Code) | | |
CONSTRUCTOR_SECTION | protected int CONSTRUCTOR_SECTION(Code) | | |
DECL_SECTION | protected int DECL_SECTION(Code) | | |
EQUALS_SECTION | protected int EQUALS_SECTION(Code) | | |
FINAL | final protected static int FINAL(Code) | | |
GETTER | final protected static Signature.TypeOfMethod GETTER(Code) | | |
GETTERINDEXED | final protected static Signature.TypeOfMethod GETTERINDEXED(Code) | | |
GETTERLIST | final protected static Signature.TypeOfMethod GETTERLIST(Code) | | |
HASHCODE_SECTION | protected int HASHCODE_SECTION(Code) | | |
HEADER_SECTION | protected int HEADER_SECTION(Code) | | |
IMPORT | final protected static int IMPORT(Code) | | |
INITIALIZE_SECTION | protected int INITIALIZE_SECTION(Code) | | |
INT | final protected static int INT(Code) | | |
MAXVALUE | protected int MAXVALUE(Code) | | |
MAX_DUMP_TREE_LINE_COUNT | final public static int MAX_DUMP_TREE_LINE_COUNT(Code) | | |
NEW_METHOD_SECTION | protected int NEW_METHOD_SECTION(Code) | | |
OTHER | final protected static Signature.TypeOfMethod OTHER(Code) | | |
PACKAGE | final protected static int PACKAGE(Code) | | |
PRIVATE | final protected static int PRIVATE(Code) | | |
PROTECTED | final protected static int PROTECTED(Code) | | |
PUBLIC | final protected static int PUBLIC(Code) | | |
REMOVE | final protected static Signature.TypeOfMethod REMOVE(Code) | | |
SETTER | final protected static Signature.TypeOfMethod SETTER(Code) | | |
SETTERINDEXED | final protected static Signature.TypeOfMethod SETTERINDEXED(Code) | | |
SIZE | final protected static Signature.TypeOfMethod SIZE(Code) | | |
STATIC | final protected static int STATIC(Code) | | |
STRING | final protected static int STRING(Code) | | |
TRAILER_SECTION | protected int TRAILER_SECTION(Code) | | |
VOID | final protected static int VOID(Code) | | |
generatedNewMethods | protected Map generatedNewMethods(Code) | | |
addProperty | public Property addProperty(String name, String dtdName, String namespace, GraphNode node, GraphLink l, String classType, int nestedLevel, int eltInstance, int groupInstance, int type, boolean ored, AttrProp[] propAttributes, String constName, String defaultValue, boolean directChild, List extraData, boolean isUnion)(Code) | | This method is called by the BeanBuilder to register a new property
on this bean class.
|
begin | protected void begin()(Code) | | |
beginNoI18N | protected void beginNoI18N()(Code) | | |
comment | protected void comment()(Code) | | |
commonBeanType | protected String commonBeanType()(Code) | | All generated beans are at least this type.
|
countNumberOfNonAttributeProperties | protected int countNumberOfNonAttributeProperties()(Code) | | |
end | protected void end(boolean cr)(Code) | | |
endNoI18N | protected void endNoI18N()(Code) | | |
eol | protected void eol(boolean cr)(Code) | | |
eolNoI18N | protected void eolNoI18N()(Code) | | |
findAttributeOwners | protected void findAttributeOwners()(Code) | | Once all properties have been added to this Bean, call this method
to figure out for attribute property who it's owner is.
That is, make Property.getAttributeOwner() work.
|
findProperty | protected Property findProperty(AttrProp attr)(Code) | | null if not found |
firstInCommaSeparatedList | protected static String firstInCommaSeparatedList(String lst)(Code) | | Returns the first element in a command separated list
|
gen | protected void gen(int a)(Code) | | |
gen | protected void gen(int a, int b, int c, int d, String s)(Code) | | |
genCopyWillCopy | protected boolean genCopyWillCopy(Property a)(Code) | | |
genDefaultsAccessable | protected void genDefaultsAccessable(Property a) throws IOException(Code) | | |
genNewDefault | protected void genNewDefault(Property prop, boolean wantConcreteType) throws IOException(Code) | | |
genNewMethod | protected String genNewMethod(String abstractType, String concreteType, String concreteFullTypeName) throws IOException(Code) | | Generate a method that will get a new instance of some type.
Only 1 method will be generated per abstractType.
Parameters: abstractType - interface name to use as return type, ifnull, then concreteType is used. Parameters: concreteType - the class to get a new instance of Parameters: concreteFullTypeName - the full name of the concreteType |
genResetMutuallyExclusive | protected void genResetMutuallyExclusive(Property a, boolean genTest) throws IOException(Code) | | Generate commands for resetting the mutually exclusive properties,
only if isMutuallyExclusive(a) returns true.
|
genRethrowExceptions | protected void genRethrowExceptions(List exceps)(Code) | | |
genSetValue | protected void genSetValue(boolean isScalar, String classType)(Code) | | |
gencr | protected void gencr(int a, int b, int c, String s)(Code) | | |
generate | public void generate(String filename, MetaDD mdd) throws IOException(Code) | | Generate the java code in the out stream, using the optional
metaDD bean graph.
|
generateDelegatorConstructors | protected void generateDelegatorConstructors(String delegatorClassName) throws IOException(Code) | | |
genforprop | protected void genforprop()(Code) | | |
gengetprop | protected void gengetprop()(Code) | | |
gengetpropbyname | protected void gengetpropbyname()(Code) | | |
gentab | protected void gentab(int n)(Code) | | |
getDefaultNamespace | public String getDefaultNamespace()(Code) | | |
getPropertyList | public List getPropertyList()(Code) | | |
getSignatures | protected Signatures getSignatures(Property a)(Code) | | |
getTypeFullClassName | protected String getTypeFullClassName(Property a)(Code) | | Parameters: a - is the Property in question Parameters: typeName - is the name of the type of @param a, could include "[]" Only if @param a is a bean will we add the packageNameto it's front. |
getTypeFullClassName | protected String getTypeFullClassName(Property a, String typeName)(Code) | | |
hasDeepCopyConstructor | protected boolean hasDeepCopyConstructor()(Code) | | |
isCloneCallNeededOnType | protected boolean isCloneCallNeededOnType(Property prop)(Code) | | |
isMutableType | protected boolean isMutableType(Property prop)(Code) | | |
isMutuallyExclusive | protected boolean isMutuallyExclusive(Property a)(Code) | | |
noI18N | protected void noI18N()(Code) | | |
printSchema | protected void printSchema() throws IOException(Code) | | Send the schema to the current output channel.
|
resetGenBuffers | protected void resetGenBuffers()(Code) | | |
select | protected void select(int o)(Code) | | |
setDefaultNamespace | public void setDefaultNamespace(String ns)(Code) | | |
tabIn | protected void tabIn()(Code) | | |
testIfPropertyNotSet | protected String testIfPropertyNotSet(Property prop)(Code) | | |
testIfPropertySet | protected String testIfPropertySet(Property prop)(Code) | | |
|
|