Returns the first annotation type matching the specified name
@param kam
@param name
@return AnnotationType, maybe null
553358
private AnnotationType getAnnotationType(final KAMStore kAMStore,
            final Kam kam, final String name) throws KAMStoreException {

        AnnotationType annoType = null;
        List<BelDocumentInfo> belDocs =
                kAMStore.getBelDocumentInfos(kam.getKamInfo());
        //loop through all BEL documents used for this KAM
        for (BelDocumentInfo doc : belDocs) {
            //check annotation type on each document
            List<AnnotationType> annoTypes = doc.getAnnotationTypes();
            for (AnnotationType a : annoTypes) {
                if (a.getName().equals(name)) {
                    annoType = a;
                    break;
                }
            }
            if (annoType != null) {
                break;
            }
        }
        return annoType;
    }
822572
public <T> T getAnnotation(Class<T> annotationClass) {
        for (Annotation annotation : m_annotations) {
            if (annotation.annotationType().equals(annotationClass)){
                return (T) annotation;
            }
        }
        return null;
    }
570036
public AnnotationValueBuilder<T> member(String name, @Nullable AnnotationValue<?> annotation) {
        if (annotation != null) {
            values.put(name, annotation);
        }
        return this;
    }
851391
public T get(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return i;
            }
        }
        return null;
    }
487900
public static <A extends Annotation> A findAnnotation(Class<?> clazz, Class<A> annotationType) {
		if (clazz == null) throw new IllegalArgumentException("Clazz parameter can't be null");
		
		A annotation = clazz.getAnnotation(annotationType);
		if (annotation != null) return annotation;
		
		for (Class<?> ifc : clazz.getInterfaces()) {
			annotation = findAnnotation(ifc, annotationType);
			if (annotation != null) return annotation;
		}
		
		if (!Annotation.class.isAssignableFrom(clazz))
			for (Annotation ann : clazz.getAnnotations()) {
				annotation = findAnnotation(ann.annotationType(), annotationType);
				if (annotation != null) return annotation;
			}
		
		Class<?> superClass = clazz.getSuperclass();
		if (superClass == null || superClass == Object.class) return null;
		return findAnnotation(superClass, annotationType);
	}
829461
def get_first(self, name):
        
        for a in self.all_annotations:
            if a.name == name:
                return a
        return None
656138
@Nullable
	public static Type evaluateJavaLangType(@Nonnull final String name) {
		Check.notEmpty(name, "name");
		Type ret = null;
		for (final Type type : JAVA_LANG_VALUE_TYPES) {
			if (type.getName().equals(name.replace("java.lang.", ""))) {
				ret = type;
				break;
			}
		}
		return ret;
	}
138844
public static JAnnotationUse getAnnotation(JAnnotatable annotatable, JClass annotationClass) {
		for (JAnnotationUse annotation : annotatable.annotations()) {
			if (annotation.getAnnotationClass().equals(annotationClass)) {
				return annotation;
			}
		}

		return null;
	}
307415
public Marker getMarker(String name) {
        if (name == null) {
            throw new IllegalArgumentException("Marker name cannot be null");
        }

        Marker marker = markerMap.get(name);
        if (marker == null) {
            marker = new BasicMarker(name);
            Marker oldMarker = markerMap.putIfAbsent(name, marker);
            if (oldMarker != null) {
                marker = oldMarker;
            }
        }
        return marker;
    }
1037016
@DefinedBy(Api.LANGUAGE_MODEL)
    public <A extends Annotation> A getAnnotation(Class<A> annoType) {

        if (!annoType.isAnnotation())
            throw new IllegalArgumentException("Not an annotation type: " + annoType);

        Attribute.Compound c = getAttribute(annoType);
        return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType);
    }
96634
public AnnotationInfo getAnnotationInfo(final String annotationClassName) {
        for(AnnotationInfo item : annotationInfos) {
            if(item.getClassName().equals(annotationClassName)) {
                return item;
            }
        }
        
        return null;
    }
1366442
public synchronized Set<Class<?>> getTypesAnnotatedWith(final Class<? extends Annotation> annotation) {
        Assert.requireNonNull(annotation, "annotation");
        return reflections.getTypesAnnotatedWith(annotation);
    }
1258956
public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
        return method.getAnnotation(annotationType);
    }
1103236
@SuppressWarnings("unchecked")
    public <A extends Annotation> Optional<A> getAnnotation(final Class<A> annoClass) {
        return Optional.ofNullable((A)annotationMap.get(annoClass));
    }
815634
public AnnotationValueBuilder<T> member(String name, @Nullable Class<?>... types) {
        if (types != null) {
            AnnotationClassValue[] classValues = new AnnotationClassValue[types.length];
            for (int i = 0; i < types.length; i++) {
                Class<?> type = types[i];
                classValues[i] = new AnnotationClassValue<>(type);
            }
            values.put(name, classValues);
        }
        return this;
    }
1372968
@Override
	@Nullable
	public String getMapping(Class<?> type) {

		Assert.notNull(type, "Type must not be null!");

		String[] mapping = getMappingFrom(findMergedAnnotation(type, annotationType));

		return mapping.length == 0 ? null : mapping[0];
	}
626479
public Class<?> getGetterType(String name) throws NoSuchMethodException {
        Class<?> type = getterTypes.get(name);
        if (type == null) {
            throw new NoSuchMethodException("There is no READABLE property named '" + name +
                    "' in class '" + className + "'");
        }
        return type;
    }