/** * Prevents a mapping from the specified class name to another name. */ public void fix(CtClass clazz) { fix(clazz.getName()); }
/** * Prevents a mapping from the specified class name to another name. */ public void fix(CtClass clazz) { fix(clazz.getName()); }
/** * Prevents a mapping from the specified class name to another name. */ public void fix(CtClass clazz) { fix(clazz.getName()); }
/** * Prevents a mapping from the specified class name to another name. */ public void fix(CtClass clazz) { fix(clazz.getName()); }
/** * Prevents a mapping from the specified class name to another name. */ public void fix(CtClass clazz) { fix(clazz.getName()); }
/** * Prevents a mapping from the specified class name to another name. */ public void fix(CtClass clazz) { fix(clazz.getName()); }
/** * Prevents a mapping from the specified class name to another name. */ public void fix(CtClass clazz) { fix(clazz.getName()); }
classMap.fix(modelClass);
public static void wrapMethods(CtClass target, CtClass from) throws NotFoundException, CannotCompileException { for (CtMethod method : from.getDeclaredMethods()) { if (Modifier.isStatic(method.getModifiers()) || !Modifier.isAbstract(method.getModifiers())) continue; ClassMap classMap = new ClassMap(); classMap.fix(from); classMap.fix(from.getSuperclass()); CtMethod wrapperMethod = new CtMethod(method, target, classMap); if (method.getGenericSignature() != null) { wrapperMethod.setGenericSignature(method.getGenericSignature()); } wrapperMethod.setBody("return ((" + from.getName() + ")this.wrapped)." + method.getName() + "($$);"); try { target.addMethod(wrapperMethod); } catch (DuplicateMemberException e) { //Skip -- Same member might be declared in various interfaces } } for (CtClass iface : from.getInterfaces()) { wrapMethods(target, iface); } }
if (mergedConstructor == null) continue; ClassMap classMap = new ClassMap(); classMap.fix(mergedConstructor.getDeclaringClass().getSuperclass()); CtConstructor mergedConstructorCopy = new CtConstructor(mergedConstructor, merged, classMap); AnnotationUtil.annotate(mergedConstructorCopy, constructor.createAndroidVersionsAnnotation(merged)); if (mergedMethod == null) continue; ClassMap classMap = new ClassMap(); classMap.fix(mergedMethod.getDeclaringClass().getSuperclass()); CtMethod mergedMethodCopy = new CtMethod(mergedMethod, merged, classMap); if (mergedMethod.getGenericSignature() != null) {
classMap.fix(modelClass);