Returns the value of {@code annotate} option. By default returns {@code true}.
500145
public boolean isAnnotatable() {
		return ObjectUtils.defaultIfNull((Boolean) configurationValues.get(ConfigurationOption.ANNOTATE), Boolean.TRUE)
		            .booleanValue();
	}
1342604
public String getConfigurationOptionValue (String optionName, String defaultValue) {
		String optionValue;
		Node configurationOption = this.getConfigurationOption (optionName);
		if (configurationOption != null) {
			optionValue = configurationOption.getTextContent ();
		} else {
			optionValue = defaultValue;
		}
		return optionValue;
	}
312711
public AnnotationValue defaultValue() {
        return (sym.defaultValue == null)
               ? null
               : new AnnotationValueImpl(env, sym.defaultValue);
    }
346439
private String getAnnotationValue(String annotation) {
        if (descriptor instanceof CAnnotatedDescriptor) {
            if (((CAnnotatedDescriptor) descriptor).hasAnnotation(annotation)) {
                return ((CAnnotatedDescriptor) descriptor).getAnnotationValue(annotation);
            }
        }
        return null;
    }
420252
protected function getReturnValue()
    {
        $annotations = array_filter($this->getParser()->getAnnotations(), function ($v) {
            $e = explode(' ', $v);
            return isset($e[0]) && $e[0] == '@return';
        });
        foreach ($annotations as $parameter) {
            $parts = explode(' ', $parameter);

            if (count($parts) < 2) {
                continue;
            }

            $type = array_slice($parts, 1, 1);
            $type = $type[0];

            $comment = implode(' ', array_slice($parts, 2));

            $string = ':returns:';

            return sprintf(
                ':returns: %s%s',
                $type ?: 'unknown',
                $comment ? ' ' . $comment : ''
            );
        }

        return false;
    }
981828
public static Object fetchAnnotationElementValue(Annotation annotation, Method element) throws ReflectiveOperationException {
		Object value = element.invoke(annotation);
		if (value == null) {
			String errorMsg = "@" + annotation.annotationType().getName() + "." +
					element.getName() + "() returned null";
			throw new NullPointerException(errorMsg);
		}
		return value;
	}
1258956
public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
        return method.getAnnotation(annotationType);
    }
847839
public String findStringValue(JvmAnnotationTarget op, Class<? extends Annotation> annotationType) {
		final JvmAnnotationReference reference = this.lookup.findAnnotation(op, annotationType);
		if (reference != null) {
			return findStringValue(reference);
		}
		return null;
	}
1015613
@SuppressWarnings("unchecked")
	public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
		for (Annotation annotation : this.annotations) {
			if (annotation.annotationType().equals(annotationType)) {
				return (T) annotation;
			}
		}
		for (Annotation metaAnn : this.annotations) {
			T ann = metaAnn.annotationType().getAnnotation(annotationType);
			if (ann != null) {
				return ann;
			}
		}
		return null;
	}
622509
public static JCas getJCas(final Annotation annotation)
    {
        JCas result = null;
        try {
            result = annotation.getCAS().getJCas();
        }
        catch (final CASException e) {
            throw new IllegalArgumentException(e);
        }

        return result;

    }
313624
public static <T> Optional<Class<T>> getElementValueClass(AnnotationMirror anno, CharSequence name,
                                                              boolean useDefaults) {
        Name cn = getElementValueClassName(anno, name, useDefaults);
        try {
            Class<?> cls = Class.forName(cn.toString());
            return Optional.of((Class<T>) cls);
        } catch (ClassNotFoundException e) {
            return Optional.empty();
        }
    }
313239
public static Annotation[] getAnnotations(AnnotatedElement annotationEle, boolean isCombination) {
		return (null == annotationEle) ? null : (isCombination ? toCombination(annotationEle) : annotationEle).getAnnotations();
	}
947353
public static boolean getOptionalBooleanParameter(Map<String, String> parameters,
                                                      String parameterName,
                                                      boolean defaultValue)
            throws JournalException {
        validateParameters(parameters);
        validateParameterName(parameterName);

        String string = parameters.get(parameterName);
        if (string == null) {
            return defaultValue;
        } else if (string.equals(VALUE_FALSE)) {
            return false;
        } else if (string.equals(VALUE_TRUE)) {
            return true;
        } else {
            throw new JournalException("'" + parameterName
                    + "' parameter must be '" + VALUE_FALSE + "'(default) or '"
                    + VALUE_TRUE + "'");
        }

    }
312832
public AnnotationVisitor getAnnotationVisitor() {
        return new AnnotationVisitor(FindBugsASM.ASM_VERSION) {
            @Override
            public void visit(String name, Object value) {
                name = canonicalString(name);
                valueMap.put(name, value);
            }

            /*
             * (non-Javadoc)
             *
             * @see
             * org.objectweb.asm.AnnotationVisitor#visitAnnotation(java.lang
             * .String, java.lang.String)
             */
            @Override
            public AnnotationVisitor visitAnnotation(String name, String desc) {
                name = canonicalString(name);
                AnnotationValue newValue = new AnnotationValue(desc);
                valueMap.put(name, newValue);
                typeMap.put(name, desc);
                return newValue.getAnnotationVisitor();
            }

            /*
             * (non-Javadoc)
             *
             * @see
             * org.objectweb.asm.AnnotationVisitor#visitArray(java.lang.String)
             */
            @Override
            public AnnotationVisitor visitArray(String name) {
                name = canonicalString(name);
                return new AnnotationArrayVisitor(name);
            }

            /*
             * (non-Javadoc)
             *
             * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
             */
            @Override
            public void visitEnd() {

            }

            /*
             * (non-Javadoc)
             *
             * @see
             * org.objectweb.asm.AnnotationVisitor#visitEnum(java.lang.String,
             * java.lang.String, java.lang.String)
             */
            @Override
            public void visitEnum(String name, String desc, String value) {
                name = canonicalString(name);
                valueMap.put(name, new EnumValue(desc, value));
                typeMap.put(name, desc);

            }
        };
    }
1094009
private List<String> defaultValue(Map<Class<? extends Annotation>, ParameterInfo<?>> annotations) {
    ParameterInfo<?> defaultInfo = annotations.get(DefaultValue.class);
    if (defaultInfo == null) {
      return Collections.emptyList();
    }

    DefaultValue defaultValue = defaultInfo.getAnnotation();
    return Collections.singletonList(defaultValue.value());
  }
17049
private boolean hasAnnotation(JavaAnnotatedElement clazz, Class<? extends Annotation> annotationClazz) {
    return clazz.getAnnotations().stream()
        .filter(item -> item.getType().isA(annotationClazz.getName()))
        .count() > 0;
  }
1074888
public static Class<? extends Annotation> checkIsBindingAnnotation(
      Class<? extends Annotation> annotation) {
    if (!isBindingAnnotation(annotation)) {
      throw new IllegalArgumentException(
          "Must be a binding annotation (BindingAnnotation or Qualifier)");
    }
    return annotation;
  }