/** * Return the name of the injection point associated with the specified * element (setter method or field.) Retrieve the name from the name * parameter of the annotation. If missing, infer the name from the setter * method or the field. */ private String getInjectionPointName( AccessibleObject ao ) { /* * Check whether the accessible object has a 'name' annotation * parameter. If the 'name' annotation parameter is not found, infer * the name from the setter method name or the field. */ A annot = ao.getAnnotation(annotClass); String name = AnnotationHelper.getAnnotationParamValue(annot,"name"); if( name==null || name.length() == 0 ) { if( ao instanceof Method ) { Method method = (Method) ao; name = MethodHelper.getSetterPropertyName(method); } else { Field field = (Field) ao; name = field.getName(); } } return name; } }
/** * Return the name of the injection point associated with the specified * element (setter method or field.) Retrieve the name from the name * parameter of the annotation. If missing, infer the name from the setter * method or the field. */ private String getInjectionPointName( AccessibleObject ao ) { /* * Check whether the accessible object has a 'name' annotation * parameter. If the 'name' annotation parameter is not found, infer * the name from the setter method name or the field. */ Annotation annot = AnnotatedElementHelper.getAnnotation(ao,annotClassNames); String name = AnnotationHelper.getAnnotationParamValue(annot,"name"); if( name==null || name.length() == 0 ) { if( ao instanceof Method ) { Method method = (Method) ao; name = MethodHelper.getSetterPropertyName(method); } else { Field field = (Field) ao; name = field.getName(); } } return name; } }
try { AnnotationHelper.<Boolean>getAnnotationParamValue(annot,"required"); AnnotationHelper.getAnnotationParamValue(annot,"contingency"); if( contingency == null ) {
"org.osoa.sca.annotations.Callback"); if( callback != null ) { callbackClass = AnnotationHelper.getAnnotationParamValue(callback,"value");
Scope.class.getName(), "org.osoa.sca.annotations.Scope"); scope = AnnotationHelper.getAnnotationParamValue(scopeAnnot,"value"); convattr = convAttrAnnot != null; if(convattr) { String ma = AnnotationHelper.getAnnotationParamValue(convAttrAnnot,"maxAge"); convMaxAge = convDurationToMilli(ma); String mit = AnnotationHelper.getAnnotationParamValue(convAttrAnnot,"maxIdleTime"); convMaxIdleTime = convDurationToMilli(mit);
if( annot != null ) { Class<?> cbcl = AnnotationHelper.getAnnotationParamValue(annot,"value"); InterfaceType cbit = new BasicInterfaceType(
String name = AnnotationHelper.getAnnotationParamValue(annot,"name"); Annotation annot = ip.getAnnotation(); boolean isRequired = // <Boolean> for compilation with javac AnnotationHelper.<Boolean>getAnnotationParamValue(annot,"required"); if(isRequired) { NameController nc =