@Override protected AnnotationBinding[] getAnnotationBindings() { return ((ReferenceBinding)_binding).getAnnotations(); }
@Override protected AnnotationBinding[] getAnnotationBindings() { return ((ReferenceBinding)_binding).getAnnotations(); }
@Override protected AnnotationBinding[] getAnnotationBindings() { return ((ReferenceBinding)_binding).getAnnotations(); }
@Override protected AnnotationBinding[] getAnnotationBindings() { return ((ReferenceBinding)_binding).getAnnotations(); }
@Override protected AnnotationBinding[] getAnnotationBindings() { return ((ReferenceBinding)_binding).getAnnotations(); }
@Override protected AnnotationBinding[] getAnnotationBindings() { return ((ReferenceBinding)_binding).getAnnotations(); }
@Override public int getFlags() { if (m_flags < 0) { m_flags = SpiWithJdtUtils.getTypeFlags(m_binding.modifiers, null, SpiWithJdtUtils.hasDeprecatedAnnotation(m_binding.getAnnotations())); } return m_flags; }
/** * Check whether an element has a superclass that is annotated with an @Inherited annotation. * @param element must be a class (not an interface, enum, etc.). * @param anno must be an annotation type, and must be @Inherited * @return true if element has a superclass that is annotated with anno */ private boolean inheritsAnno(ReferenceBinding element, ReferenceBinding anno) { do { AnnotationBinding[] annos = element.getAnnotations(); for (AnnotationBinding annoBinding : annos) { if (annoBinding.getAnnotationType() == anno) { // element is annotated with anno return true; } } } while (null != (element = element.superclass())); return false; }
@Override protected AnnotationBinding[] getAnnotationBindings() { PackageBinding packageBinding = (PackageBinding) this._binding; char[][] compoundName = CharOperation.arrayConcat(packageBinding.compoundName, TypeConstants.PACKAGE_INFO_NAME); ReferenceBinding type = this._env.getLookupEnvironment().getType(compoundName); AnnotationBinding[] annotations = null; if (type != null && type.isValidBinding()) { annotations = type.getAnnotations(); } return annotations; }
@Override protected AnnotationBinding[] getAnnotationBindings() { PackageBinding packageBinding = (PackageBinding) this._binding; char[][] compoundName = CharOperation.arrayConcat(packageBinding.compoundName, TypeConstants.PACKAGE_INFO_NAME); ReferenceBinding type = this._env.getLookupEnvironment().getType(compoundName); AnnotationBinding[] annotations = null; if (type != null && type.isValidBinding()) { annotations = type.getAnnotations(); } return annotations; }
@Override protected AnnotationBinding[] getAnnotationBindings() { PackageBinding packageBinding = (PackageBinding) this._binding; char[][] compoundName = CharOperation.arrayConcat(packageBinding.compoundName, TypeConstants.PACKAGE_INFO_NAME); ReferenceBinding type = this._env.getLookupEnvironment().getType(compoundName); AnnotationBinding[] annotations = null; if (type != null && type.isValidBinding()) { annotations = type.getAnnotations(); } return annotations; }
@Override protected AnnotationBinding[] getAnnotationBindings() { PackageBinding packageBinding = (PackageBinding) this._binding; char[][] compoundName = CharOperation.arrayConcat(packageBinding.compoundName, TypeConstants.PACKAGE_INFO_NAME); ReferenceBinding type = this._env.getLookupEnvironment().getType(compoundName); AnnotationBinding[] annotations = null; if (type != null && type.isValidBinding()) { annotations = type.getAnnotations(); } return annotations; }
@Override public List<BindingAnnotationWithJdt> getAnnotations() { if (m_annotations != null) { return m_annotations; } getSourceTypeBinding(); ReferenceBinding refType = m_binding; if (m_binding.actualType() != null) { refType = m_binding.actualType(); } m_annotations = SpiWithJdtUtils.createBindingAnnotations(m_env, this, refType.getAnnotations()); return m_annotations; }
@Override protected AnnotationBinding[] getAnnotationBindings() { PackageBinding packageBinding = (PackageBinding) this._binding; char[][] compoundName = CharOperation.arrayConcat(packageBinding.compoundName, TypeConstants.PACKAGE_INFO_NAME); ReferenceBinding type = this._env.getLookupEnvironment().getType(compoundName); AnnotationBinding[] annotations = null; if (type != null && type.isValidBinding()) { annotations = type.getAnnotations(); } return annotations; }
@Override protected AnnotationBinding[] getAnnotationBindings() { PackageBinding packageBinding = (PackageBinding) this._binding; char[][] compoundName = CharOperation.arrayConcat(packageBinding.compoundName, TypeConstants.PACKAGE_INFO_NAME); ReferenceBinding type = this._env.getLookupEnvironment().getType(compoundName); AnnotationBinding[] annotations = null; if (type != null && type.isValidBinding()) { annotations = type.getAnnotations(); } return annotations; }
/** * Check whether an element has a superclass that is annotated with an @Inherited annotation. * @param element must be a class (not an interface, enum, etc.). * @param anno must be an annotation type, and must be @Inherited * @return true if element has a superclass that is annotated with anno */ private boolean inheritsAnno(ReferenceBinding element, ReferenceBinding anno) { ReferenceBinding searchedElement = element; do { if (searchedElement instanceof ParameterizedTypeBinding) { searchedElement = ((ParameterizedTypeBinding) searchedElement).genericType(); } AnnotationBinding[] annos = Factory.getPackedAnnotationBindings(searchedElement.getAnnotations()); for (AnnotationBinding annoBinding : annos) { if (annoBinding.getAnnotationType() == anno) { //$IDENTITY-COMPARISON$ // element is annotated with anno return true; } } } while (null != (searchedElement = searchedElement.superclass())); return false; }
public IAnnotationBinding[] getAnnotations() { if (this.prototype != null) { return this.prototype.getAnnotations(); } if (this.annotations != null) { return this.annotations; } org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding refType = null; if (this.binding instanceof ParameterizedTypeBinding) { refType = ((ParameterizedTypeBinding) this.binding).genericType(); } else if (this.binding.isAnnotationType() || this.binding.isClass() || this.binding.isEnum() || this.binding.isInterface()) { refType = (org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding) this.binding; } if (refType != null) { return this.annotations = resolveAnnotationBindings(refType.getAnnotations(), false); } return this.annotations = AnnotationBinding.NoAnnotations; } private IAnnotationBinding[] resolveAnnotationBindings(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] internalAnnotations, boolean isTypeUse) {
@Override public IAnnotationBinding[] getAnnotations() { if (this.prototype != null) { return this.prototype.getAnnotations(); } if (this.annotations != null) { return this.annotations; } org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding refType = null; if (this.binding instanceof ParameterizedTypeBinding) { refType = ((ParameterizedTypeBinding) this.binding).genericType(); } else if (this.binding.isAnnotationType() || this.binding.isClass() || this.binding.isEnum() || this.binding.isInterface()) { refType = (org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding) this.binding; } if (refType != null) { return this.annotations = resolveAnnotationBindings(refType.getAnnotations(), false); } return this.annotations = AnnotationBinding.NoAnnotations; } private IAnnotationBinding[] resolveAnnotationBindings(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] internalAnnotations, boolean isTypeUse) {
public IAnnotationBinding[] getAnnotations() { if (this.prototype != null) { return this.prototype.getAnnotations(); } if (this.annotations != null) { return this.annotations; } org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding refType = null; if (this.binding instanceof ParameterizedTypeBinding) { refType = ((ParameterizedTypeBinding) this.binding).genericType(); } else if (this.binding.isAnnotationType() || this.binding.isClass() || this.binding.isEnum() || this.binding.isInterface()) { refType = (org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding) this.binding; } if (refType != null) { return this.annotations = resolveAnnotationBindings(refType.getAnnotations(), false); } return this.annotations = AnnotationBinding.NoAnnotations; } private IAnnotationBinding[] resolveAnnotationBindings(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] internalAnnotations, boolean isTypeUse) {
public IAnnotationBinding[] getAnnotations() { if (this.prototype != null) { return this.prototype.getAnnotations(); } if (this.annotations != null) { return this.annotations; } org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding refType = null; if (this.binding instanceof ParameterizedTypeBinding) { refType = ((ParameterizedTypeBinding) this.binding).genericType(); } else if (this.binding.isAnnotationType() || this.binding.isClass() || this.binding.isEnum() || this.binding.isInterface()) { refType = (org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding) this.binding; } if (refType != null) { return this.annotations = resolveAnnotationBindings(refType.getAnnotations(), false); } return this.annotations = AnnotationBinding.NoAnnotations; } private IAnnotationBinding[] resolveAnnotationBindings(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] internalAnnotations, boolean isTypeUse) {