public void setDeprecated(final boolean deprecated) { this.checkMutable(); if (deprecated) { T _delegate = this.getDelegate(); _delegate.setDeprecated(true); this.addAnnotation(this.getCompilationUnit().getAnnotationReferenceProvider().newAnnotationReference(Deprecated.class)); } else { T _delegate_1 = this.getDelegate(); _delegate_1.setDeprecated(false); final AnnotationReference existingReference = this.findAnnotation(this.getCompilationUnit().getTypeLookup().findTypeGlobally(Deprecated.class)); if ((existingReference != null)) { this.removeAnnotation(existingReference); } } } }