Examples of DecoratedTypeDeclaration


Examples of net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration

    return formBeanParameters;
  }

  private static void gatherFormBeanParameters(TypeMirror type, ArrayList<ResourceParameter> formBeanParameters) {
    if (type instanceof DeclaredType) {
      DecoratedTypeDeclaration typeDeclaration = (DecoratedTypeDeclaration) DeclarationDecorator.decorate(((DeclaredType) type).getDeclaration());
      for (FieldDeclaration field : typeDeclaration.getFields()) {
        if (isResourceParameter(field)) {
          formBeanParameters.add(new ResourceParameter(field));
        }
        else if (isFormBeanParameter(field)) {
          gatherFormBeanParameters(field.getType(), formBeanParameters);
        }
      }

      for (PropertyDeclaration property : typeDeclaration.getProperties()) {
        if (isResourceParameter(property)) {
          formBeanParameters.add(new ResourceParameter(property));
        }
        else if (isFormBeanParameter(property)) {
          gatherFormBeanParameters(property.getPropertyType(), formBeanParameters);
View Full Code Here

Examples of net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration

    if (delegate == null || delegate.getQualifiedName().equals(Object.class.getName())) {
      return Collections.emptyList();
    }

    List<ResourceParameter> resourceParameters = new ArrayList<ResourceParameter>();
    DecoratedTypeDeclaration decorated = (DecoratedTypeDeclaration) DeclarationDecorator.decorate(delegate);
    for (FieldDeclaration field : decorated.getFields()) {
      if (ResourceParameter.isResourceParameter(field)) {
        resourceParameters.add(new ResourceParameter(field));
      }
    }

    for (PropertyDeclaration property : decorated.getProperties()) {
      if (ResourceParameter.isResourceParameter(property)) {
        resourceParameters.add(new ResourceParameter(property));
      }
    }
View Full Code Here

Examples of net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration

  /**
   * test the accept method.
   */
  public void testAccept() throws Exception {

    DecoratedTypeDeclaration declaration = new DecoratedTypeDeclaration(getDeclaration("org.codehaus.enunciate.samples.schema.AccessorFilterBean"));
    Collection<FieldDeclaration> fields = declaration.getFields();
    Collection<PropertyDeclaration> properties = declaration.getProperties();
    AccessorFilter filter = new AccessorFilter(XmlAccessType.PUBLIC_MEMBER);

    // From the JAXB 2.0 javadoc for PUBLIC_MEMBER:
    // Every public getter/setter pair and every public field will be automatically bound to
    // XML, unless annotated by XmlTransient. Fields or getter/setter pairs that are private,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.