Java Code Examples for com.sun.tools.javac.code.Type#CapturedType

The following examples show how to use com.sun.tools.javac.code.Type#CapturedType . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SourceUtils.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/**
 * @since 0.24
 */
public static WildcardType resolveCapturedType(TypeMirror type) {
    if (type instanceof Type.CapturedType) {
        return ((Type.CapturedType) type).wildcard;
    } else {
        return null;
    }
}
 
Example 2
Source File: StructuralTypeEraser.java    From manifold with Apache License 2.0 5 votes vote down vote up
@Override
public Type visitCapturedType( Type.CapturedType t, Void s )
{
  Type w_bound = t.wildcard.type;
  w_bound = eraseBound( t, w_bound );
  if( w_bound == t.wildcard.type )
  {
    return t;
  }
  return new Type.CapturedType( t.tsym.name, t.tsym.owner, t.getUpperBound(), t.lower, t.wildcard );
}
 
Example 3
Source File: JNIWriter.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public R visitCapturedType(Type.CapturedType t, P p) {
    return defaultAction(t, p);
}
 
Example 4
Source File: JNIWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public R visitCapturedType(Type.CapturedType t, P p) {
    return defaultAction(t, p);
}
 
Example 5
Source File: TypePrinter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected String capturedVarId(Type.CapturedType t, Locale locale) {
    throw new InternalError("should never call this");
}
 
Example 6
Source File: TypePrinter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public String visitCapturedType(Type.CapturedType t, Locale locale) {
    return visit(t.wildcard, locale);
}