Package org.apache.muse.tools.inspector

Examples of org.apache.muse.tools.inspector.JavaProperty


    if(capability.getProperties().size() == 0) {
      return;
    }
   
    for(Iterator i=capability.getProperties().iterator(); i.hasNext();) {
      JavaProperty property = (JavaProperty)i.next();
     
      generateGetOperation(property, classInfo, code);
      genereateSetOperation(property, classInfo, code);

    }
View Full Code Here


   * @return
   *         A wrapped version of the property containing its QName and
   *         corresponding java class.
   */
  private JavaProperty makeJavaProperty(QName property, ResourceInspector inspector) {
    JavaProperty javaProperty = new JavaProperty();
   
    javaProperty.setQName(property);
    javaProperty.setJavaType(inspector.getPropertyType(property));
   
    return javaProperty;
  }
View Full Code Here

    indent(code);
    generateOpenBlock(code);
    newLine(code);
   
    for(Iterator i=capability.getProperties().iterator(); i.hasNext();) {
      JavaProperty property = (JavaProperty)i.next();
      indent(2,code);
      code.append("new "
        + convertType(QName.class, classInfo)
        + "(NAMESPACE_URI, \""
        + getPropertyName(property, false)
        + "\", PREFIX)");
      if(i.hasNext()) {
        code.append(",");
      }
      newLine(code);
    }
   
    indent(code);
    generateCloseBlock(code);
    statement(";",code);
    newLine(2,code);
   
    indent(code);
    code.append("public "
      + convertType(QName.class, classInfo)
      + "[] getPropertyNames()");
    newLine(code);
   
    indent(code);
    generateOpenBlock(code);
    newLine(code);
   
    indent(2,code);
    code.append("return _PROPERTIES;");
   
    newLine(code);
    indent(code);
    generateCloseBlock(code);
    newLine(2,code);
   
    for(Iterator i=capability.getProperties().iterator(); i.hasNext();) {
      JavaProperty property = (JavaProperty)i.next();
      indent(code);
      code.append("private "
        + convertType(property.getJavaType(), classInfo)
        + " _"
        + getPropertyName(property, false)
        + ";");
      newLine(2, code);
    }
View Full Code Here

    if(capability.getProperties().size() == 0) {
      return;
    }
   
    for(Iterator i=capability.getProperties().iterator(); i.hasNext();) {
      JavaProperty property = (JavaProperty)i.next();
      indent(code);
      code.append("public "
        + convertType(property.getJavaType(), classInfo)
        + " get"
        + getPropertyName(property, true)
        + "()");
     
      if(generateBody) {
        newLine(code);
        indent(code);
        generateOpenBlock(code);
        newLine(code);
       
        indent(2,code);
        statement("return _"
          + getPropertyName(property, false)
          ";",code);
        newLine(code);
       
        indent(code);
        generateCloseBlock(code);
      } else {
        code.append(";");
      }
      newLine(2,code);
     
      indent(code);
      code.append("public void");
      code.append(" set"
        + getPropertyName(property, true)
        + "("
        + convertType(property.getJavaType(), classInfo)
        + " param0)");
     
      if(generateBody) {
        newLine(code);
        indent(code);
View Full Code Here

TOP

Related Classes of org.apache.muse.tools.inspector.JavaProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.