/** * Convert an array of compiler annotation bindings into a list of AnnotationMirror * @return a non-null, possibly empty, unmodifiable list. */ public List<? extends AnnotationMirror> getAnnotationMirrors(AnnotationBinding[] annotations) { if (null == annotations || 0 == annotations.length) { return Collections.emptyList(); } List<AnnotationMirror> list = new ArrayList<>(annotations.length); for (AnnotationBinding annotation : annotations) { if (annotation == null) continue; list.add(newAnnotationMirror(annotation)); } return Collections.unmodifiableList(list); }
/** * Convert an array of compiler annotation bindings into a list of AnnotationMirror * @return a non-null, possibly empty, unmodifiable list. */ public List<? extends AnnotationMirror> getAnnotationMirrors(AnnotationBinding[] annotations) { if (null == annotations || 0 == annotations.length) { return Collections.emptyList(); } List<AnnotationMirror> list = new ArrayList<>(annotations.length); for (AnnotationBinding annotation : annotations) { if (annotation == null) continue; list.add(newAnnotationMirror(annotation)); } return Collections.unmodifiableList(list); }
/** * Convert an array of compiler annotation bindings into a list of AnnotationMirror * @return a non-null, possibly empty, unmodifiable list. */ public List<? extends AnnotationMirror> getAnnotationMirrors(AnnotationBinding[] annotations) { if (null == annotations || 0 == annotations.length) { return Collections.emptyList(); } List<AnnotationMirror> list = new ArrayList<>(annotations.length); for (AnnotationBinding annotation : annotations) { if (annotation == null) continue; list.add(newAnnotationMirror(annotation)); } return Collections.unmodifiableList(list); }
/** * Convert an array of compiler annotation bindings into a list of AnnotationMirror * @return a non-null, possibly empty, unmodifiable list. */ public List<? extends AnnotationMirror> getAnnotationMirrors(AnnotationBinding[] annotations) { if (null == annotations || 0 == annotations.length) { return Collections.emptyList(); } List<AnnotationMirror> list = new ArrayList<AnnotationMirror>(annotations.length); for (AnnotationBinding annotation : annotations) { if (annotation == null) continue; list.add(newAnnotationMirror(annotation)); } return Collections.unmodifiableList(list); }
/** * Convert an array of compiler annotation bindings into a list of AnnotationMirror * @return a non-null, possibly empty, unmodifiable list. */ public List<? extends AnnotationMirror> getAnnotationMirrors(AnnotationBinding[] annotations) { if (null == annotations || 0 == annotations.length) { return Collections.emptyList(); } List<AnnotationMirror> list = new ArrayList<AnnotationMirror>(annotations.length); for (AnnotationBinding annotation : annotations) { if (annotation == null) continue; list.add(newAnnotationMirror(annotation)); } return Collections.unmodifiableList(list); }
/** * Convert an array of compiler annotation bindings into a list of AnnotationMirror * @return a non-null, possibly empty, unmodifiable list. */ public List<? extends AnnotationMirror> getAnnotationMirrors(AnnotationBinding[] annotations) { if (null == annotations || 0 == annotations.length) { return Collections.emptyList(); } List<AnnotationMirror> list = new ArrayList<AnnotationMirror>(annotations.length); for (AnnotationBinding annotation : annotations) { if (annotation == null) continue; list.add(newAnnotationMirror(annotation)); } return Collections.unmodifiableList(list); }
list.add(_env.getFactory().newAnnotationMirror(annotation));
list.add(_env.getFactory().newAnnotationMirror(annotation));
list.add(_env.getFactory().newAnnotationMirror(annotation));
list.add(_env.getFactory().newAnnotationMirror(annotation));
list.add(_env.getFactory().newAnnotationMirror(annotation));
list.add(_env.getFactory().newAnnotationMirror(annotation));
private AnnotationMirrorImpl createAnnotationMirror(String annoTypeName, AnnotationBinding annoInstance) { ReferenceBinding binding = annoInstance.getAnnotationType(); if (binding != null && binding.isAnnotationType() ) { char[] qName; if (binding.isMemberType()) { annoTypeName = annoTypeName.replace('$', '.'); qName = CharOperation.concatWith(binding.enclosingType().compoundName, binding.sourceName, '.'); CharOperation.replace(qName, '$', '.'); } else { qName = CharOperation.concatWith(binding.compoundName, '.'); } if(annoTypeName.equals(new String(qName)) ){ return (AnnotationMirrorImpl)_env.getFactory().newAnnotationMirror(annoInstance); } } return null; }
private AnnotationMirrorImpl createAnnotationMirror(String annoTypeName, AnnotationBinding annoInstance) { ReferenceBinding binding = annoInstance.getAnnotationType(); if (binding != null && binding.isAnnotationType() ) { char[] qName; if (binding.isMemberType()) { annoTypeName = annoTypeName.replace('$', '.'); qName = CharOperation.concatWith(binding.enclosingType().compoundName, binding.sourceName, '.'); CharOperation.replace(qName, '$', '.'); } else { qName = CharOperation.concatWith(binding.compoundName, '.'); } if(annoTypeName.equals(new String(qName)) ){ return (AnnotationMirrorImpl)_env.getFactory().newAnnotationMirror(annoInstance); } } return null; }
(AnnotationMirrorImpl)_env.getFactory().newAnnotationMirror(annoInstance); return (A)Proxy.newProxyInstance(annotationClass.getClassLoader(), new Class[]{ annotationClass }, annoMirror );
private AnnotationMirrorImpl createAnnotationMirror(String annoTypeName, AnnotationBinding annoInstance) { ReferenceBinding binding = annoInstance.getAnnotationType(); if (binding != null && binding.isAnnotationType() ) { char[] qName; if (binding.isMemberType()) { annoTypeName = annoTypeName.replace('$', '.'); qName = CharOperation.concatWith(binding.enclosingType().compoundName, binding.sourceName, '.'); CharOperation.replace(qName, '$', '.'); } else { qName = CharOperation.concatWith(binding.compoundName, '.'); } if(annoTypeName.equals(new String(qName)) ){ return (AnnotationMirrorImpl)_env.getFactory().newAnnotationMirror(annoInstance); } } return null; }
(AnnotationMirrorImpl)_env.getFactory().newAnnotationMirror((AnnotationBinding)jdtValue); return Proxy.newProxyInstance(expectedType.getClassLoader(), new Class[]{ expectedType }, annoMirror );
(AnnotationMirrorImpl)_env.getFactory().newAnnotationMirror(annoInstance); return (A)Proxy.newProxyInstance(annotationClass.getClassLoader(), new Class[]{ annotationClass }, annoMirror );
(AnnotationMirrorImpl)_env.getFactory().newAnnotationMirror(annoInstance); return (A)Proxy.newProxyInstance(annotationClass.getClassLoader(), new Class[]{ annotationClass }, annoMirror );
(AnnotationMirrorImpl)_env.getFactory().newAnnotationMirror((AnnotationBinding)jdtValue); return Proxy.newProxyInstance(expectedType.getClassLoader(), new Class[]{ expectedType }, annoMirror );