Removed class level cache.

pull/527/head
jackygurui 9 years ago
parent b6d124f6ca
commit 0c5ae23aea

@ -15,13 +15,8 @@ import net.bytebuddy.matcher.ElementMatchers;
*/
public class Introspectior {
private static final ConcurrentMap<Class, TypeDescription.ForLoadedType> tCache = PlatformDependent.newConcurrentHashMap();
public static TypeDescription.ForLoadedType getTypeDescription(Class c) {
if (!tCache.containsKey(c)) {
return new TypeDescription.ForLoadedType(c);
}
return tCache.get(c);
return new TypeDescription.ForLoadedType(c);
}
public static MethodDescription getMethodDescription(Class c, String method) {
@ -45,8 +40,8 @@ public class Introspectior {
}
public static FieldList<FieldDescription.InDefinedShape> getFieldsWithAnnotation(Class c, Class<? extends Annotation> a) {
return getTypeDescription(c)
.getDeclaredFields()
.filter(ElementMatchers.isAnnotatedWith(a));
return getTypeDescription(c)
.getDeclaredFields()
.filter(ElementMatchers.isAnnotatedWith(a));
}
}

Loading…
Cancel
Save