Package org.eclipse.xtext.common.types

Examples of org.eclipse.xtext.common.types.JvmTypeParameter


  @Inject
  private IJvmModelAssociator associator;
 
  protected void copyAndFixTypeParameters(List<JvmTypeParameter> typeParameters, JvmTypeParameterDeclarator target) {
    for (JvmTypeParameter typeParameter : typeParameters) {
      final JvmTypeParameter clonedTypeParameter = jvmTypesBuilder.cloneWithProxies(typeParameter);
      if (clonedTypeParameter != null) {
        target.getTypeParameters().add(clonedTypeParameter);
        boolean upperBoundSeen = false;
        for (JvmTypeConstraint constraint : clonedTypeParameter.getConstraints()) {
          if (constraint instanceof JvmUpperBound) {
            upperBoundSeen = true;
            break;
          }
        }
        if (!upperBoundSeen) {
          JvmUpperBound upperBound = typesFactory.createJvmUpperBound();
          upperBound.setTypeReference(typeReferences.getTypeForName(Object.class, typeParameter));
          clonedTypeParameter.getConstraints().add(upperBound);
        }
        associator.associate(typeParameter, clonedTypeParameter);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.xtext.common.types.JvmTypeParameter

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.