Package com.sun.javadoc

Examples of com.sun.javadoc.Type


  public Type getOutputType() {
    return declaringMethod.returnType();
  }

  public boolean isOutputWrapped() {
    Type returnType = declaringMethod.returnType();
    if (returnType.isPrimitive()) {
      return false;
    }
    if (returnWrappedTags == null) {
      return false;
    }
View Full Code Here


      return text.substring(0, ws);
    return text;
  }

  public String getOutputTypeString() {
    Type returnType = getOutputType();
    return returnType.qualifiedTypeName() + returnType.dimension();
  }
View Full Code Here

  public String getJavaTypeName() {
    return getJavaType().qualifiedTypeName();
  }

  public boolean isJAXBType() {
    Type type = getJavaType();
    return !type.isPrimitive() && klass.getRegistry().isJAXBClass(type.qualifiedTypeName());
  }
View Full Code Here

        }
        close("dd");
      }
    } else {
      open("dd");
      Type returnType = output.getOutputType();
      printOutputType(returnType, types);
      if (output.getOutputDoc() != null) {
        print(" - ");
        print(output.getOutputDoc());
      }
View Full Code Here

        printOutputType(returnType, types);
      else
        around("tt", escape(typeName));
    } else {
      open("dd");
      Type returnType = inputParameter.getType();
      printOutputType(returnType, types);
    }
    String doc = inputParameter.getDoc();
    if (!Utils.isEmptyOrNull(doc)) {
      print(" - ");
View Full Code Here

    close("table");
  }

  private void printMemberType(PropertyDoc prop) {
    open("tt");
    final Type type = prop.getType();
    printMemberTypeGeneric(type);
    close("tt");
  }
View Full Code Here

    /** Print the parameters of the parameterized type t */
    private String typeParameters(Options opt, ParameterizedType t) {
  String tp = "";
  if (t == null)
      return tp;
  Type args[] = t.typeArguments();
  tp += "<";
  for (int i = 0; i < args.length; i++) {
      tp += type(opt, args[i]);
      if (i != args.length - 1)
    tp += ", ";
View Full Code Here

      return;
  String className = c.toString();
  String cs = getNodeName(c);

  // Print generalization (through the Java superclass)
  Type s = c.superclassType();
  if (s != null &&
      !s.toString().equals("java.lang.Object") &&
      !c.isEnum() &&
      !hidden(s.asClassDoc())) {
        ClassDoc sc = s.asClassDoc();
    w.println("\t//" + c + " extends " + s + "\n" +
        "\t" + getNodeName(sc) + ":p -> " + cs + ":p [dir=back,arrowtail=empty];");
    getClassInfo(className).addRelation(sc.toString(), RelationType.EXTENDS, RelationDirection.OUT);
    getClassInfo(sc.toString()).addRelation(className, RelationType.EXTENDS, RelationDirection.IN);
  }
View Full Code Here

    }



    private FieldRelationInfo getFieldRelationInfo(FieldDoc field) {
  Type type = field.type();
  if(type.isPrimitive() || type instanceof WildcardType || type instanceof TypeVariable)
      return null;
 
  if (type.dimension().endsWith("[]")) {
      return new FieldRelationInfo(type.asClassDoc(), true);
  }
 
  Options opt = optionProvider.getOptionsFor(type.asClassDoc());
  if (opt.matchesCollPackageExpression(type.qualifiedTypeName())) {
      Type[] argTypes = getInterfaceTypeArguments(collectionClassDoc, type);
      if (argTypes != null && argTypes.length == 1) {
    return new FieldRelationInfo(argTypes[0].asClassDoc(), true);
      }
      argTypes = getInterfaceTypeArguments(mapClassDoc, type);
      if (argTypes != null && argTypes.length == 2) {
    return new FieldRelationInfo(argTypes[1].asClassDoc(), true);
      }
  }

  return new FieldRelationInfo(type.asClassDoc(), false);
    }
View Full Code Here

    public static MethodIdentity create(MethodDoc method)
    {
      final List<String> parameterTypeNames = new ArrayList<String>();
      for (Parameter param: method.parameters())
      {
        Type type = param.type();
        parameterTypeNames.add(type.qualifiedTypeName() + type.dimension());
      }

      return new MethodIdentity(method.qualifiedName(), parameterTypeNames);
    }
View Full Code Here

TOP

Related Classes of com.sun.javadoc.Type

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.