Examples of DecoratedClassType


Examples of net.sf.jelly.apt.decorations.type.DecoratedClassType

        }

        // in the case where the return type is com.sun.jersey.api.JResponse,
        // we can use the type argument to get the entity type
        if (returnTypeMirror.isClass() && returnTypeMirror.isInstanceOf("com.sun.jersey.api.JResponse")) {
          DecoratedClassType jresponse = (DecoratedClassType) returnTypeMirror;
          if (!jresponse.getActualTypeArguments().isEmpty()) {
            DecoratedTypeMirror responseType = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(jresponse.getActualTypeArguments().iterator().next());
            if (responseType.isDeclared()) {
              responseType.setDocComment(returnTypeMirror.getDocComment());
              returnTypeMirror = responseType;
            }
          }
View Full Code Here

Examples of net.sf.jelly.apt.decorations.type.DecoratedClassType

   */
  private class ReferencedJsonTypeDefinitionVisitor extends DefaultReferencedTypeVisitor {
    private final LinkedList<String> referenceStack = new LinkedList<String>();

    public void visitClassType(ClassType classType) {
      DecoratedClassType decorated = (DecoratedClassType) TypeMirrorDecorator.decorate(classType);
      if (decorated.getDeclaration() != null && Object.class.getName().equals(decorated.getDeclaration().getQualifiedName())) {
        //skip base object; not a type definition.
        return;
      }

      String qualifiedName = decorated.getDeclaration().getQualifiedName();
      if (referenceStack.contains(qualifiedName)) {
        //we're already visiting this class...
        return;
      }

      referenceStack.addFirst(qualifiedName);
      try {
        if (!decorated.isCollection()) {
          ClassDeclaration declaration = classType.getDeclaration();
          if (declaration != null) {
              addJsonType(JsonTypeDefinition.createTypeDefinition(declaration));
          }
        }
View Full Code Here

Examples of net.sf.jelly.apt.decorations.type.DecoratedClassType

    public void visitClassType(ClassType classType) {
      if (classType instanceof AdapterType) {
        ((AdapterType) classType).getAdaptingType().accept(this);
      }
      else if (MapTypeUtil.findMapType(classType) == null) {
        DecoratedClassType decorated = (DecoratedClassType) TypeMirrorDecorator.decorate(classType);
        String qualifiedName = decorated.getDeclaration().getQualifiedName();
        if (decorated.getDeclaration() != null && Object.class.getName().equals(qualifiedName)) {
          //skip base object; not a type definition.
          return;
        }

        if (referenceStack.contains(qualifiedName)) {
          //we're already visiting this class...
          return;
        }

        referenceStack.addFirst(qualifiedName);
        try {
          if (!decorated.isCollection() && !decorated.isInstanceOf(JAXBElement.class.getName())) {
            ClassDeclaration declaration = classType.getDeclaration();
            if (declaration != null) {
              add(createTypeDefinition(declaration));
            }
          }
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.