public static IType getTypeForTypeVar( Object ref, IType iface, int iIndex ) { IType rtType = TypeSystem.getFromObject( ref ); IType rtIface = TypeSystem.findParameterizedType( rtType, iface ); return rtIface.getTypeParameters()[iIndex]; }
protected boolean isCoercingDimensionWithSameType( IType to, IType from ) { if( JavaTypes.IDIMENSION().isAssignableFrom( from ) ) { IType numberType = TypeSystem.findParameterizedType( from, JavaTypes.IDIMENSION() ).getTypeParameters()[1]; if( to == numberType ) { // must be better than Boxed coercion (which is 2 right now) return true; } } return false; } }
IType implTypeAsParamType = TypeSystem.findParameterizedType(implReturnType, JavaTypes.LIST()); if(implTypeAsParamType != null){ IType jsonParamType = jsonReturnType.getTypeParameters()[0]; IType implTypeAsParamType = TypeSystem.findParameterizedType(implReturnType, JavaTypes.MAP()); if(implTypeAsParamType != null){ IType jsonParamType = jsonReturnType.getTypeParameters()[0];
rhsType.isFinal() && JavaTypes.IDIMENSION().isAssignableFrom( rhsType ) ) IType rhsDimension = TypeSystem.findParameterizedType( rhsType, JavaTypes.IDIMENSION() ); IType[] typeParameters = rhsDimension.getTypeParameters(); if( typeParameters == null) {