@Override public boolean subtype(Type other, HashSet<SubtypeRelation> subtypes) { if (other instanceof JavaClassType) { if (Util.javaToWyvType(Integer.class).subtype(other, subtypes)) return true; return ((JavaClassType) other).getInnerClass().equals(Object.class); } return other instanceof Int; }
private static List<NameBinding> getNameBindings( List<String> paramNames, Class[] parameterTypes) { ArrayList<NameBinding> output = new ArrayList<NameBinding>(); int i = 0; for (Class arg : parameterTypes) { output.add(new NameBindingImpl(paramNames.get(i++), Util.javaToWyvType(arg))); } return output; }
private static List<NameBinding> getNameBindings(Method m) { Class[] args = m.getParameterTypes(); List<String> names = getNames(m); ArrayList<NameBinding> output = new ArrayList<NameBinding>(); int i = 0; for (Class arg : args) { output.add(new NameBindingImpl(names.get(i++), Util.javaToWyvType(arg))); } return output; }