Ejemplo n.º 1
0
  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);
  }
 private String getClassName(IClass clazz) {
   TypeName typeName = clazz.getName();
   return typeName.getPackage().toString().replaceAll("/", ".") + "." + typeName.getClassName();
 }