public static TypeReference getCapsuleMockupClassReference(TypeReference capsuleInterface) { ClassLoaderReference loader = capsuleInterface.getClassLoader(); TypeName interfaceName = capsuleInterface.getName(); String pkg = interfaceName.getPackage().toString(); String name = interfaceName.getClassName().toString() + CAPSULE_MOCKUP_SUFFIX; return TypeReference.findOrCreateClass(loader, pkg, name); }
/** * @param m * @return true iff we can treat m as a no-op method */ protected boolean canIgnore(MemberReference m) { TypeReference T = m.getDeclaringClass(); TypeName n = T.getName(); Atom p = n.getPackage(); return (ignoredPackages.contains(p)); }
private String getClassName(IClass clazz) { TypeName typeName = clazz.getName(); return typeName.getPackage().toString().replaceAll("/", ".") + "." + typeName.getClassName(); }