use of org.glassfish.hk2.classmodel.reflect.InterfaceModel in project Payara by payara.
the class AnnotationInfo method init.
private void init(ExtensibleType<? extends ExtensibleType> type) {
// recurse first so that re-stated annotations "override"
ExtensibleType<? extends ExtensibleType> supertype = type.getParent();
if (supertype != null) {
init(supertype);
}
for (InterfaceModel implementedInterface : type.getInterfaces()) {
if (implementedInterface != null && implementedInterface != type) {
init(implementedInterface);
}
}
// collect annotations
putAll(type.getAnnotations(), typeAnnotations);
if (type instanceof ClassModel) {
for (FieldModel field : ((ClassModel) type).getFields()) {
putAll(field.getAnnotations(), fieldAnnotations.computeIfAbsent(field.getName(), key -> new ConcurrentHashMap<>()));
}
}
for (MethodModel method : type.getMethods()) {
putAll(method.getAnnotations(), methodAnnotations.computeIfAbsent(getSignature(method), key -> new ConcurrentHashMap<>()));
for (Parameter parameter : method.getParameters()) {
putAll(parameter.getAnnotations(), methodParameterAnnotations.computeIfAbsent(getIdentifier(parameter), key -> new ConcurrentHashMap<>()));
}
}
}
Aggregations