Examples of TypeParameter


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeParameter

      }
    }

    TypeParameter[] typeParameters = this.referenceContext.typeParameters;
    nextVariable : for (int i = 0, paramLength = typeParameters == null ? 0 : typeParameters.length; i < paramLength; i++) {
      TypeParameter typeParameter = typeParameters[i];
      TypeVariableBinding typeVariable = typeParameter.binding;
      if (typeVariable == null || !typeVariable.isValidBinding()) continue nextVariable;

      TypeReference[] boundRefs = typeParameter.bounds;
      if (boundRefs != null) {
View Full Code Here

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

   
    IValueList genericTypes = new IValueList(values);
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (!node.typeParameters().isEmpty()) {
        for (Iterator it = node.typeParameters().iterator(); it.hasNext();) {
          TypeParameter t = (TypeParameter) it.next();
          genericTypes.add(visitChild(t));
        }
      }
    }
 
View Full Code Here

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

   
    IValueList genericTypes = new IValueList(values);
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (!node.typeParameters().isEmpty()) {     
        for (Iterator it = node.typeParameters().iterator(); it.hasNext();) {
          TypeParameter t = (TypeParameter) it.next();
          genericTypes.add(visitChild(t));     
        }
      }
    }
   
View Full Code Here

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

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

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

    node.getName().accept(this);
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (!node.typeParameters().isEmpty()) {
        this.buffer.append("<");//$NON-NLS-1$
        for (Iterator it = node.typeParameters().iterator(); it.hasNext(); ) {
          TypeParameter t = (TypeParameter) it.next();
          t.accept(this);
          if (it.hasNext()) {
            this.buffer.append(",");//$NON-NLS-1$
          }
        }
        this.buffer.append(">");//$NON-NLS-1$
      }
    }
    this.buffer.append(" ");//$NON-NLS-1$
    if (node.getAST().apiLevel() == JLS2) {
      if (getSuperclass(node) != null) {
        this.buffer.append("extends ");//$NON-NLS-1$
        getSuperclass(node).accept(this);
        this.buffer.append(" ");//$NON-NLS-1$
      }
      if (!superInterfaces(node).isEmpty()) {
        this.buffer.append(node.isInterface() ? "extends " : "implements ");//$NON-NLS-2$//$NON-NLS-1$
        for (Iterator it = superInterfaces(node).iterator(); it.hasNext(); ) {
          Name n = (Name) it.next();
          n.accept(this);
          if (it.hasNext()) {
            this.buffer.append(", ");//$NON-NLS-1$
          }
        }
        this.buffer.append(" ");//$NON-NLS-1$
      }
    }
    if (node.getAST().apiLevel() >= AST.JLS3) {
      if (node.getSuperclassType() != null) {
        this.buffer.append("extends ");//$NON-NLS-1$
        node.getSuperclassType().accept(this);
        this.buffer.append(" ");//$NON-NLS-1$
      }
      if (!node.superInterfaceTypes().isEmpty()) {
        this.buffer.append(node.isInterface() ? "extends " : "implements ");//$NON-NLS-2$//$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

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

        if (!node.typeParameters().isEmpty()) {
            _output("<");

            Iterator it;
            for (it = node.typeParameters().iterator(); it.hasNext();) {
                TypeParameter t = (TypeParameter) it.next();
                t.accept(this);
                if (it.hasNext()) {
                    _output(", ");
                }
            }
View Full Code Here

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

                _output("<");

                Iterator it;

                for (it = node.typeParameters().iterator(); it.hasNext();) {
                    TypeParameter t = (TypeParameter) it.next();
                    t.accept(this);

                    if (it.hasNext()) {
                        _output(", ");
                    }
                }

                _output(">");
            }
        }

        _output(" ");

        if (node.getSuperclassType() != null) {
            _output("extends ");
            node.getSuperclassType().accept(this);
            _output(" ");
        }

        if (!node.superInterfaceTypes().isEmpty()) {
            _output(node.isInterface() ? "extends " : "implements ");
            //$NON-NLS-2$
            Iterator it;
            for (it = node.superInterfaceTypes().iterator(); it.hasNext();) {
                Type t = (Type) it.next();
                t.accept(this);
                if (it.hasNext()) {
                    _output(", ");
                }
            }
            _output(" ");
View Full Code Here

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

   @SuppressWarnings("unchecked")
   @Override
   public TypeVariableSource<O> addTypeVariable()
   {
      TypeParameter tp2 = method.getAST().newTypeParameter();
      method.typeParameters().add(tp2);
      return new TypeVariableImpl<O>(parent, tp2);
   }
View Full Code Here

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

   @SuppressWarnings("unchecked")
   @Override
   public TypeVariableSource<O> addTypeVariable()
   {
      TypeParameter tp2 = method.getAST().newTypeParameter();
      method.typeParameters().add(tp2);
      return new TypeVariableImpl<O>(parent, tp2);
   }
View Full Code Here

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

        "java", "util", "Set" }));
    cu.imports().add(id);

    TypeDeclaration td = ast.newTypeDeclaration();
    td.setName(ast.newSimpleName("Foo"));
    TypeParameter tp = ast.newTypeParameter();
    tp.setName(ast.newSimpleName("X"));
    td.typeParameters().add(tp);
    cu.types().add(td);

    MethodDeclaration md = ast.newMethodDeclaration();
    md.modifiers().add(ast.newModifier(ModifierKeyword.PUBLIC_KEYWORD));
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.