Package com.google.dart.engine.internal.element

Examples of com.google.dart.engine.internal.element.TypeParameterElementImpl


  }

  @Override
  public Void visitTypeParameter(TypeParameter node) {
    SimpleIdentifier parameterName = node.getName();
    TypeParameterElementImpl typeParameter = new TypeParameterElementImpl(parameterName);

    TypeParameterTypeImpl typeParameterType = new TypeParameterTypeImpl(typeParameter);
    typeParameter.setType(typeParameterType);

    currentHolder.addTypeParameter(typeParameter);
    parameterName.setStaticElement(typeParameter);
    return super.visitTypeParameter(node);
  }
View Full Code Here


   */
  private Type[] createTypeParameterTypes(TypeParameterElement[] typeParameters) {
    int typeParameterCount = typeParameters.length;
    Type[] typeArguments = new Type[typeParameterCount];
    for (int i = 0; i < typeParameterCount; i++) {
      TypeParameterElementImpl typeParameter = (TypeParameterElementImpl) typeParameters[i];
      TypeParameterTypeImpl typeParameterType = new TypeParameterTypeImpl(typeParameter);
      typeParameter.setType(typeParameterType);
      typeArguments[i] = typeParameterType;
    }
    return typeArguments;
  }
View Full Code Here

  @Override
  public Void visitTypeParameter(TypeParameter node) {
    super.visitTypeParameter(node);
    TypeName bound = node.getBound();
    if (bound != null) {
      TypeParameterElementImpl typeParameter = (TypeParameterElementImpl) node.getName().getStaticElement();
      if (typeParameter != null) {
        typeParameter.setBound(bound.getType());
      }
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.internal.element.TypeParameterElementImpl

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.