|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.beanmaker.Creator
|
+--org.beanmaker.BeanCreator
BeanCreator creates the JavaBean writes it on the file.
This operation is the result of parser operation of descriptor file (xml file).
The skeleton of the JavaBean is the following:
package com.foo;
import java.sql.*;
public class nomeClasse {
declaration of the attributes
constructor ( public nomeClasse(){} )
declaration of get and set methods
end of class
Creator| Field Summary |
| Fields inherited from class org.beanmaker.Creator |
CLASS_NAME, CLOSE_PARENTHESIS, DEFINITION_ATTRIBUTE, DEFINITION_CLASS, DEFINITION_METHOD, END_LINE, ESTENSION, EXTENDS, IMPLEMENTS, IMPORT, METHOD_GET, METHOD_GET_BOOLEAN, METHOD_SET, OPEN_PARENTHESIS, PACKAGE, PATH |
| Fields inherited from interface org.beanmaker.BeanMakerConstants |
RETURN_CARRIAGE, TAB |
| Constructor Summary | |
BeanCreator(java.lang.String[] args)
Constructs the object. |
|
| Method Summary | |
protected java.lang.String |
buildAttribute(java.lang.String attributeType,
java.lang.String attributeName)
Creates the attribute in the following format private attributeType attributeName; |
protected java.lang.String |
buildConstructor(java.lang.String className)
Creates the constructor. |
protected java.lang.String |
buildHeaderClass(java.lang.String beanName,
java.lang.String superclass,
java.util.ArrayList vInterfaces)
Creates the signature of the class. |
protected java.lang.String |
buildMethod(java.lang.String typeMethod,
java.lang.String type,
java.lang.String attribute)
Creates the set or get method (specify in typeMethod) of the property specified in attribute. |
protected void |
createBean(Bean bean,
java.lang.String path)
Handles the writing operations of the JavaBean |
protected java.lang.String |
createPath(java.lang.String sPackage,
java.lang.String root)
Creates the path where to save JavaBean |
java.util.ArrayList |
getBeans(Configuration conf)
|
java.util.ArrayList |
getListValue(ConfigurationImpl root,
java.lang.String name)
Return a collection of value of configuration specified in name |
java.lang.String |
getSingleValue(ConfigurationImpl root,
java.lang.String name)
Return the single value of configuration specified in name |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class org.beanmaker.Creator |
formatAttribute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BeanCreator(java.lang.String[] args)
args - the arguments that specify to BeanCreator where creates the JavaBean.| Method Detail |
protected java.lang.String buildAttribute(java.lang.String attributeType,
java.lang.String attributeName)
attributeType - type of the attribute(es.String,int), attributeName name of the attribute
protected java.lang.String buildConstructor(java.lang.String className)
protected java.lang.String buildMethod(java.lang.String typeMethod,
java.lang.String type,
java.lang.String attribute)
protected java.lang.String buildHeaderClass(java.lang.String beanName,
java.lang.String superclass,
java.util.ArrayList vInterfaces)
protected void createBean(Bean bean,
java.lang.String path)
path - path where to save the JavaBean
protected java.lang.String createPath(java.lang.String sPackage,
java.lang.String root)
sPackage - specifies the package nel file xml, command
public java.util.ArrayList getBeans(Configuration conf)
throws ConfigurationException
ConfigurationException
public java.util.ArrayList getListValue(ConfigurationImpl root,
java.lang.String name)
throws ConfigurationException
root - Root configuration, name name of Configuration
ConfigurationException
public java.lang.String getSingleValue(ConfigurationImpl root,
java.lang.String name)
throws ConfigurationException
root - Root configuration, name name of Configuration
ConfigurationExceptionpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||