public AnnotationValue[] getAnnotations() { if (allAnnotationsArray == NOT_CONFIGURED) setupAnnotations(annotationHelper.getAnnotations(ctClass)); return allAnnotationsArray; }
protected void setupParameterAnnotations(Object[][] annotations) { for (int param = 0 ; param < annotations.length ; param++) { AnnotationValue[] annotationValues = new AnnotationValue[annotations[param].length]; for (int ann = 0 ; ann < annotationValues.length ; ann++) { Class<?> clazz = ((Annotation)annotations[param][ann]).annotationType(); AnnotationInfo info = (AnnotationInfo)((JavassistTypeInfoFactoryImpl)annotationHelper).getTypeInfo(clazz); annotationValues[ann] = annotationHelper.createAnnotationValue(info, annotations[param][ann]); } ((JavassistParameterInfo)parameters[param]).setAnnotations(annotationValues); } }
protected void setupParameterAnnotations(Object[][] annotations) { for (int param = 0 ; param < annotations.length ; param++) { AnnotationValue[] annotationValues = new AnnotationValue[annotations[param].length]; for (int ann = 0 ; ann < annotationValues.length ; ann++) { Class clazz = ((Annotation)annotations[param][ann]).annotationType(); AnnotationInfo info = (AnnotationInfo)((JavassistTypeInfoFactoryImpl)annotationHelper).getTypeInfo(clazz); annotationValues[ann] = annotationHelper.createAnnotationValue(info, annotations[param][ann]); } ((JavassistParameterInfo)parameters[param]).setAnnotations(annotationValues); } }
protected AnnotationValue[] getAnnotations(Object obj) { synchronized (this) { if (allAnnotationsArray == NOT_CONFIGURED) { allAnnotationsArray = annotationHelper.getAnnotations(obj); setupAnnotations(allAnnotationsArray); } } return allAnnotationsArray; }
protected void setupParameterAnnotations(Object[][] annotations) { if (annotations == null) return; for (int param = 0 ; param < annotations.length ; param++) { AnnotationValue[] annotationValues = new AnnotationValue[annotations[param].length]; for (int ann = 0 ; ann < annotationValues.length ; ann++) { Class<?> clazz = ((Annotation)annotations[param][ann]).annotationType(); AnnotationInfo info = (AnnotationInfo)((BytecodeTypeInfoFactoryImpl)annotationHelper).getTypeInfo(clazz); annotationValues[ann] = annotationHelper.createAnnotationValue(info, annotations[param][ann]); } ((BytecodeParameterInfo)parameters[param]).setAnnotations(annotationValues); } }
protected AnnotationValue[] getAnnotations(Object obj) { synchronized (this) { if (annotationsArray == NOT_CONFIGURED) { annotationsArray = null; setupAnnotations(annotationHelper.getAnnotations(obj)); } } return annotationsArray; }
rtnValue = annotationHelper.createAnnotationValue((AnnotationInfo)type, value);
protected AnnotationValue[] getAnnotations(Object obj) { synchronized (this) { if (annotationsArray == NOT_CONFIGURED) { annotationsArray = null; setupAnnotations(annotationHelper.getAnnotations(obj)); } } return annotationsArray; }
rtnValue = annotationHelper.createAnnotationValue((AnnotationInfo)type, value);
/** * Get the declared annotations * * @return the declared annotations */ protected AnnotationValue[] getDeclaredAnnotations() { if (declaredAnnotationsArray == UNKNOWN_ANNOTATIONS) setupAnnotations(annotationHelper.getAnnotations(annotatedElement)); return declaredAnnotationsArray; }
/** * Get all the annotations as a map * * @return the map */ protected Map<String, AnnotationValue> getAllAnnotations() { if (allAnnotations == UNKNOWN_ANNOTATIONS_MAP) setupAnnotations(annotationHelper.getAnnotations(annotatedElement)); return allAnnotations; }
public AnnotationValue[] getAnnotations() { if (allAnnotationsArray == UNKNOWN_ANNOTATIONS) setupAnnotations(annotationHelper.getAnnotations(annotatedElement)); return allAnnotationsArray; }
public AnnotationValue getAnnotation(String name) { if (allAnnotations == UNKNOWN_ANNOTATIONS_MAP) setupAnnotations(annotationHelper.getAnnotations(annotatedElement)); return allAnnotations.get(name); }
public boolean isAnnotationPresent(String name) { if (allAnnotations == UNKNOWN_ANNOTATIONS_MAP) setupAnnotations(annotationHelper.getAnnotations(annotatedElement)); return allAnnotations.containsKey(name); }
/** * Get all the annotations as a map * * @return the map */ protected Map<String, AnnotationValue> getAllAnnotations() { if (allAnnotations == null) setupAnnotations(annotationHelper.getAnnotations(ctClass)); return allAnnotations; }
public boolean isAnnotationPresent(String name) { if (allAnnotations == UNKNOWN_ANNOTATIONS_MAP) setupAnnotations(annotationHelper.getAnnotations(annotatedElement)); return allAnnotations.containsKey(name); }
public AnnotationValue[] getAnnotations() { if (allAnnotationsArray == UNKNOWN_ANNOTATIONS) setupAnnotations(annotationHelper.getAnnotations(annotatedElement)); return allAnnotationsArray; }
public AnnotationValue getAnnotation(String name) { if (allAnnotations == UNKNOWN_ANNOTATIONS_MAP) setupAnnotations(annotationHelper.getAnnotations(annotatedElement)); return allAnnotations.get(name); }
protected AnnotationValue[] getAnnotations(Object obj) { synchronized (this) { if (annotationsArray == NOT_CONFIGURED) { annotationsArray = null; setupAnnotations(annotationHelper.getAnnotations(obj)); } } return annotationsArray; }
public AnnotationValue[] getAnnotations() { if (allAnnotationsArray == NOT_CONFIGURED) setupAnnotations(annotationHelper.getAnnotations(classBytes)); return allAnnotationsArray; }