/** * hasAnnotation, if class c contains annotation targetClass * * @param c * @param targetClass * @param annotationRepository * @return */ private boolean hasAnnotation(Class c, Class targetClass, AnnotationRepository annotationRepository) { Collection<Annotation> values = annotationRepository.getAnnotation(targetClass); if (values == null) return false; for (Annotation annotation : values) { if (annotation.getClassName() != null && annotation.getClassName().equals(c.getName())) return true; } return false; }
/** * Has a NotNull annotation attached * @param annotationRepository The annotation repository * @param annotation The annotation being checked * @return True of the method/field contains the NotNull annotation; otherwise false */ private boolean hasNotNull(AnnotationRepository annotationRepository, Annotation annotation) { Collection<Annotation> values = annotationRepository.getAnnotation(javax.validation.constraints.NotNull.class); if (values == null || values.size() == 0) return false; for (Annotation notNullAnnotation : values) { if (notNullAnnotation.getClassName().equals(annotation.getClassName()) && notNullAnnotation.getMemberName().equals(annotation.getMemberName())) return true; } return false; } }
/** * Attach @ConnectionDefinition * @param annotation The annotation * @param classLoader The class loader * @param configProperty The config properties * @param plainConfigProperty The plain config properties * @return The updated metadata * @exception Exception Thrown if an error occurs */ private ConnectionDefinition attachConnectionDefinition(Annotation annotation, ClassLoader classLoader, ArrayList<? extends ConfigProperty> configProperty, ArrayList<? extends ConfigProperty> plainConfigProperty) throws Exception { javax.resource.spi.ConnectionDefinition cd = (javax.resource.spi.ConnectionDefinition) annotation.getAnnotation(); if (trace) log.trace("Processing: " + annotation); return attachConnectionDefinition(annotation.getClassName(), cd, classLoader, configProperty, plainConfigProperty); }
Class clz = Class.forName(annotation.getClassName(), true, classLoader); Class clz = Class.forName(annotation.getClassName(), true, classLoader);
log.trace("Processing: " + connectionDefinitionsAnnotation); return attachConnectionDefinitions(connectionDefinitionsAnnotation, annotation.getClassName(), classLoader, configProperties, plainConfigProperties);
log.trace("Processing: " + a); String aoName = null; String aoClassName = annotation.getClassName(); Class<?> aClass = Class.forName(aoClassName, true, classLoader); List<Class<?>> declaredInterfaces = null;
String attachedClassName = annotation.getClassName(); Class attachedClass = Class.forName(attachedClassName, true, classLoader);
if (annotation.getClassName().equals(((ConfigPropertyImpl) configProperty).getAttachedClassName())) Set<String> asClasses = getClasses(annotation.getClassName(), classLoader); for (ConfigProperty configProperty : plainConfigProperties) for (Class asClass : activation.messageListeners()) Activationspec asMeta = new ActivationSpecImpl(new XsdString(annotation.getClassName(), null), requiredConfigProperties, validProperties,
String raClass = annotation.getClassName(); javax.resource.spi.Connector connectorAnnotation = (javax.resource.spi.Connector)annotation.getAnnotation();