public Type bind(final Type type) { Type result = fineApproximation( type ); assert TypeUtils.isResolved( result ); return result; }
public TypeEnvironment getEnvironment(Type t, TypeEnvironment context) { return CompoundTypeEnvironment.create( getEnvironment(t), context ); }
@Override public int hashCode() { return safeHashCode( getGenericComponentType() ); } };
@Override public int hashCode() { return safeHashCode( getActualTypeArguments() ) ^ safeHashCode( getRawType() ) ^ safeHashCode( getOwnerType() ); } };
public TypeEnvironment toApproximatingEnvironment(TypeEnvironment context) { return CompoundTypeEnvironment.create( new ApproximatingTypeEnvironment(), context ); }
@Override public Type caseTypeVariable(TypeVariable typeVariable) { if ( !containsKey( typeVariable )) { return typeVariable; } return get( typeVariable ); }
private static Boolean areResolved(Type[] types) { for ( Type t : types ) { if ( !isResolved( t ) ) { return false; } } return true; }
private static Boolean areSimple(Type[] types) { for ( Type t : types ) { if ( !isSimple( t ) ) { return false; } } return true; }
public static TypeEnvironment create(TypeEnvironment f, TypeEnvironment g) { if ( g == IdentityTypeEnvironment.INSTANCE ) return f; if ( f == IdentityTypeEnvironment.INSTANCE ) return g; return new CompoundTypeEnvironment( f, g ); }
public TypeEnvironment getEnvironment(Type context) { if ( context == null ) { return IdentityTypeEnvironment.INSTANCE; } return createEnvironment( context ); }
private Type[] substitute(Type[] types) { Type[] substTypes = new Type[types.length]; for ( int i = 0; i < substTypes.length ; i++ ) { substTypes[i] = bind( types[i] ); } return substTypes; } }
public SimpleTypeEnvironment(Type[] formalTypeArgs, Type[] actualTypeArgs) { for (int i = 0; i < formalTypeArgs.length; i++) { put( formalTypeArgs[i], actualTypeArgs[i] ); } }
private CompoundTypeEnvironment(TypeEnvironment f, TypeEnvironment g) { this.f = f; this.g = g; hashCode = doHashCode(); }
public Type bind(final Type type) { Type result = fineApproximation( type ); assert TypeUtils.isResolved( result ); return result; }
public TypeEnvironment getEnvironment(Type t, TypeEnvironment context) { return CompoundTypeEnvironment.create( getEnvironment(t), context ); }
@Override public int hashCode() { return safeHashCode( getGenericComponentType() ); } };
public static TypeEnvironment create(TypeEnvironment f, TypeEnvironment g) { if ( g == IdentityTypeEnvironment.INSTANCE ) return f; if ( f == IdentityTypeEnvironment.INSTANCE ) return g; return new CompoundTypeEnvironment( f, g ); }
public Type bind(final Type type) { Type result = fineApproximation( type ); assert TypeUtils.isResolved( result ); return result; }
public Type bind(final Type type) { Type result = fineApproximation( type ); assert TypeUtils.isResolved( result ); return result; }
public Type bind(final Type type) { Type result = fineApproximation( type ); assert TypeUtils.isResolved( result ); return result; }