Skip to content

Commit

Permalink
Update chGet rid of support dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanenicolas committed Aug 28, 2014
1 parent 7ccdd42 commit c001003
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion morpheus-commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
compile "com.github.stephanenicolas.javassist:javassist-build-plugin-api:$JAVASSIST_BUILD_PLUGIN_API"
compile "org.projectlombok:lombok:$LOMBOK_VERSION"
compile "com.google.android:android:$ANDROID_VERSION"
compile "com.android.support:support-v4:$ANDROID_SUPPORT_VERSION"
testCompile "com.android.support:support-v4:$ANDROID_SUPPORT_VERSION"

testCompile "junit:junit:$JUNIT_VERSION"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static boolean isFragment(CtClass clazz) throws NotFoundException {
}

public static boolean isSupportFragment(CtClass clazz) throws NotFoundException {
return isSubClass(clazz.getClassPool(), clazz, android.support.v4.app.Fragment.class);
return isSubClass(clazz.getClassPool(), clazz, "android.support.v4.app.Fragment");
}

public static boolean isView(CtClass clazz) throws NotFoundException {
Expand All @@ -140,6 +140,12 @@ public static boolean isSubClass(ClassPool classPool, CtClass clazz, Class<?> su
return clazz.subclassOf(classPool.get(superClass.getName()));
}

/** Super class */
public static boolean isSubClass(ClassPool classPool, CtClass clazz, String superClassName)
throws NotFoundException {
return clazz.subclassOf(classPool.get(superClassName));
}

public static List<CtField> getAllInjectedFieldsForAnnotation(CtClass clazz,
Class<? extends Annotation> annotationClazz) {
List<CtField> result = new ArrayList<CtField>();
Expand Down

0 comments on commit c001003

Please sign in to comment.