fields.put(field, annotationBuilder);
}
if (System.getSecurityManager() != null)
{
AccessController.doPrivileged(new SetAccessiblePrivilegedAction(field));
}
else
{
field.setAccessible(true);
}
for (Annotation annotation : field.getAnnotations())
{
if (overwrite || !annotationBuilder.isAnnotationPresent(annotation.annotationType()))
{
annotationBuilder.add(annotation);
}
}
}
for (Method method : ReflectionUtils.getAllDeclaredMethods(type))
{
AnnotationBuilder annotationBuilder = methods.get(method);
if (annotationBuilder == null)
{
annotationBuilder = new AnnotationBuilder();
methods.put(method, annotationBuilder);
}
if (System.getSecurityManager() != null)
{
AccessController.doPrivileged(new SetAccessiblePrivilegedAction(method));
}
else
{
method.setAccessible(true);
}