Example usage for org.eclipse.jdt.internal.compiler.lookup TypeVariableBinding otherUpperBounds

List of usage examples for org.eclipse.jdt.internal.compiler.lookup TypeVariableBinding otherUpperBounds

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup TypeVariableBinding otherUpperBounds.

Prototype

public TypeBinding[] otherUpperBounds() 

Source Link

Usage

From source file:com.redhat.ceylon.eclipse.core.model.mirror.JDTTypeParameter.java

License:Open Source License

public JDTTypeParameter(TypeVariableBinding parameter, JDTType type,
        IdentityHashMap<TypeBinding, JDTType> originatingTypes) {
    name = new String(parameter.readableName());
    List<TypeBinding> javaBounds = new ArrayList<TypeBinding>();
    javaBounds.add(parameter.upperBound());
    javaBounds.addAll(Arrays.asList(parameter.otherUpperBounds()));
    bounds = new ArrayList<TypeMirror>(javaBounds.size());
    for (TypeBinding bound : javaBounds)
        bounds.add(JDTType.toTypeMirror(bound, parameter, type, originatingTypes));
}

From source file:org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNodeBuilder.java

License:Open Source License

private TypeBinding[] getBounds(TypeVariableBinding tv) {
    List<TypeBinding> bounds = new ArrayList<TypeBinding>();
    if (tv.firstBound == null) {
        return new TypeBinding[] { tv.erasure() }; // Should be JLObject
        // return new TypeBinding[] { resolver.getScope().getJavaLangObject() };
        // return null;
    }//from   w w  w  .  j  a v  a2 s  . c om
    bounds.add(tv.firstBound);
    TypeBinding[] obs = tv.otherUpperBounds();
    for (int i = 0; i < obs.length; i++) {
        bounds.add(obs[i]);
    }
    return bounds.toArray(new TypeBinding[bounds.size()]);
}