Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.Type


        ClassInstanceCreation cic = (ClassInstanceCreation) argExpression;
        AnonymousClassDeclaration acd = cic.getAnonymousClassDeclaration();
        if (acd != null) {
          return false;
        } else {
          Type typeName = cic.getType();
          if (typeName instanceof SimpleType) {
            SimpleType simpleType = (SimpleType) typeName;
            className = simpleType.getName().getFullyQualifiedName();
            List args = cic.arguments();
            if (args != null && args.size() > 0) {
View Full Code Here


            monitor.worked(1);

            logger.debug("Check for interfaces");

            for (Object typeDecO : typeDec.superInterfaceTypes()) {
              Type tDec = (Type) typeDecO;
              logger.debug("Implements " + tDec);
              StringBuilder iface = new StringBuilder("package "
                  + adapteePkg.getElementName() + ";"
                  + System.getProperty("line.separator"));
              iface.append(System.getProperty("line.separator")
                  + "/** Automatically generated interface dependency */"
                  + System.getProperty("line.separator"));
              iface.append("public interface " + tDec + "{}");
              // The interfaces should not be opened
              insertType(adapteePkg, tDec.toString(),
                  iface.toString(), false, monitor);
            }

            adapted = true;
          }
View Full Code Here

   */
  public boolean visit(ArrayCreation node) {
    this.buffer.append("new ");//$NON-NLS-1$
    ArrayType at = node.getType();
    int dims = at.getDimensions();
    Type elementType = at.getElementType();
    elementType.accept(this);
    for (Iterator it = node.dimensions().iterator(); it.hasNext(); ) {
      this.buffer.append("[");//$NON-NLS-1$
      Expression e = (Expression) it.next();
      e.accept(this);
      this.buffer.append("]");//$NON-NLS-1$
View Full Code Here

    }
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (!node.typeArguments().isEmpty()) {
        this.buffer.append("<");//$NON-NLS-1$
        for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
          Type t = (Type) it.next();
          t.accept(this);
          if (it.hasNext()) {
            this.buffer.append(",");//$NON-NLS-1$
          }
        }
        this.buffer.append(">");//$NON-NLS-1$
View Full Code Here

    printIndent();
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (!node.typeArguments().isEmpty()) {
        this.buffer.append("<");//$NON-NLS-1$
        for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
          Type t = (Type) it.next();
          t.accept(this);
          if (it.hasNext()) {
            this.buffer.append(",");//$NON-NLS-1$
          }
        }
        this.buffer.append(">");//$NON-NLS-1$
View Full Code Here

    node.getName().accept(this);
    this.buffer.append(" ");//$NON-NLS-1$
    if (!node.superInterfaceTypes().isEmpty()) {
      this.buffer.append("implements ");//$NON-NLS-1$
      for (Iterator it = node.superInterfaceTypes().iterator(); it.hasNext(); ) {
        Type t = (Type) it.next();
        t.accept(this);
        if (it.hasNext()) {
          this.buffer.append(", ");//$NON-NLS-1$
        }
      }
      this.buffer.append(" ");//$NON-NLS-1$
View Full Code Here

    }
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (!node.typeArguments().isEmpty()) {
        this.buffer.append("<");//$NON-NLS-1$
        for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
          Type t = (Type) it.next();
          t.accept(this);
          if (it.hasNext()) {
            this.buffer.append(",");//$NON-NLS-1$
          }
        }
        this.buffer.append(">");//$NON-NLS-1$
View Full Code Here

   */
  public boolean visit(ParameterizedType node) {
    node.getType().accept(this);
    this.buffer.append("<");//$NON-NLS-1$
    for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
      Type t = (Type) it.next();
      t.accept(this);
      if (it.hasNext()) {
        this.buffer.append(",");//$NON-NLS-1$
      }
    }
    this.buffer.append(">");//$NON-NLS-1$
View Full Code Here

    }
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (!node.typeArguments().isEmpty()) {
        this.buffer.append("<");//$NON-NLS-1$
        for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
          Type t = (Type) it.next();
          t.accept(this);
          if (it.hasNext()) {
            this.buffer.append(",");//$NON-NLS-1$
          }
        }
        this.buffer.append(">");//$NON-NLS-1$
View Full Code Here

    this.buffer.append("super.");//$NON-NLS-1$
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (!node.typeArguments().isEmpty()) {
        this.buffer.append("<");//$NON-NLS-1$
        for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
          Type t = (Type) it.next();
          t.accept(this);
          if (it.hasNext()) {
            this.buffer.append(",");//$NON-NLS-1$
          }
        }
        this.buffer.append(">");//$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.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.