Returns a key for {@code type} annotated by {@code annotation}.
962292
private static String get(Type type, Annotation annotation) {
    type = boxIfPrimitive(type);
    if (annotation == null && type instanceof Class && !((Class<?>) type).isArray()) {
      return ((Class<?>) type).getName();
    }
    StringBuilder result = new StringBuilder();
    if (annotation != null) {
      result.append(annotation).append("/");
    }
    typeToString(type, result, true);
    return result.toString();
  }
1255534
public static String getSetKey(ExecutableElement method) {
    StringBuilder result = new StringBuilder();
    AnnotationMirror qualifier = getQualifier(method.getAnnotationMirrors());
    if (qualifier != null) {
      qualifierToString(qualifier, result);
    }
    result.append(SET_PREFIX);
    typeToString(method.getReturnType(), result, '$');
    result.append(">");
    return result.toString();
  }
225520
public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
        Annotation value = annotations.get(annotationType);
        return annotationType.cast(value);
    }
1331223
@SuppressWarnings("unchecked")
  public static Class<?> getValueType(Class<? extends CoreAnnotation> key) {
    Class type = valueCache.get(key);
    if (type == null) {
      try {
        type = key.newInstance().getType();
      } catch (Exception e) {
        throw new RuntimeException("Unexpected failure to instantiate - is your key class fancy?", e);
      }
      valueCache.put((Class)key, type);
    }
    return type;
  }
414304
protected final List<Parameter> getParameters(Type type, List<Annotation> annotations) {
        return getParameters(type, annotations, typesToSkip);
    }
203328
public static <T> T getAnnotation(final Class c, final Class<T> annotation) {
        final List<T> found = getAnnotations(c, annotation);
        if (found != null && !found.isEmpty()) {
            return found.get(0);
        } else {
            return null;
        }
    }
435869
public static <A extends Annotation> A getAnnotation(final Method method, final Class<A> annotationType) {
        A ann = method.getAnnotation(annotationType);
        if (ann == null) {
            for (final Annotation metaAnn : method.getAnnotations()) {
                ann = metaAnn.annotationType().getAnnotation(annotationType);
                if (ann != null) {
                    break;
                }
            }
        }
        return ann;
    }
543099
function typeAnnotation(type) {
    return (target, key, index) => {
        const classAnnotationsStore = container.get(AnnotationsServiceName.ClassAnnotationsStore);
        const classTypesStore = container.get(TypesServiceName.ClassTypesStore);
        if (index === undefined) {
            // property
            classAnnotationsStore.addPropertyAnnotation(target.constructor, key, Type, { type });
            classTypesStore.setPropertyType(target.constructor, key, type);
        }
        else {
            // method parameter
            classAnnotationsStore.addMethodParameterAnnotation(target.constructor, key, index, Type, { type });
            classTypesStore.setMethodParameterType(target.constructor, key, index, type);
        }
    };
}
162818
protected Key getKeyByType(KeyType type) {
		switch (type) {
		case PrivateKey:
			if (null == this.privateKey) {
				throw new NullPointerException("Private key must not null when use it !");
			}
			return this.privateKey;
		case PublicKey:
			if (null == this.publicKey) {
				throw new NullPointerException("Public key must not null when use it !");
			}
			return this.publicKey;
		}
		throw new CryptoException("Uknown key type: " + type);
	}
283391
private Event.Type getEventTypeFromAnnotation(Class<? extends Annotation> annotation) {
      if (annotation == CacheEntryCreated.class) return Event.Type.CACHE_ENTRY_CREATED;
      if (annotation == CacheEntryModified.class) return Event.Type.CACHE_ENTRY_MODIFIED;
      if (annotation == CacheEntryRemoved.class) return Event.Type.CACHE_ENTRY_REMOVED;
      if (annotation == CacheEntryActivated.class) return Event.Type.CACHE_ENTRY_ACTIVATED;
      if (annotation == CacheEntryInvalidated.class) return Event.Type.CACHE_ENTRY_INVALIDATED;
      if (annotation == CacheEntryLoaded.class) return Event.Type.CACHE_ENTRY_LOADED;
      if (annotation == CacheEntryPassivated.class) return Event.Type.CACHE_ENTRY_PASSIVATED;
      if (annotation == CacheEntryVisited.class) return Event.Type.CACHE_ENTRY_VISITED;
      if (annotation == CacheEntriesEvicted.class) return Event.Type.CACHE_ENTRY_EVICTED;
      if (annotation == CacheEntryExpired.class) return Event.Type.CACHE_ENTRY_EXPIRED;
      return null;
   }
793479
public List<Annotation> get(AnnotationType type, @NonNull Span span) {
      return annotationSet.select(span, a -> a.isInstance(type) && a.overlaps(span));
   }
357280
public <A extends Annotation> A getMethodAnnotation(Class<A> annotationType) {
        return adaptAnnotation(getAnnotatedElement().getAnnotation(annotationType));
    }
902190
private static Map<String, Object> changeAnnotationValuesToMap(Annotation annotation,
			Class<? extends Annotation> type) {
		Map<String, Object> result = new HashMap<String, Object>();
		result.put("AnnotationExist", true);
		for (Method method : type.getDeclaredMethods())
			try {
				result.put(method.getName(), method.invoke(annotation, (Object[]) null));
			} catch (Exception e) {// NOSONAR
			}
		return result;
	}
1186900
private <A extends Annotation> AnnotationConverter<A> getConverter(Annotation annotation) {
		MappingOption mappingOption = annotation.annotationType().getAnnotation( MappingOption.class );
		if ( mappingOption == null ) {
			return null;
		}

		// wrong type would be a programming error of the annotation developer
		@SuppressWarnings("unchecked")
		Class<? extends AnnotationConverter<A>> converterClass = (Class<? extends AnnotationConverter<A>>) mappingOption.value();

		try {
			return converterClass.newInstance();
		}
		catch (Exception e) {
			throw log.cannotConvertAnnotation( converterClass, e );
		}
	}
737018
public static Integer getSarlClassification(ProgramElementDoc type) {
		final AnnotationDesc annotation = Utils.findFirst(type.annotations(), it ->
				qualifiedNameEquals(it.annotationType().qualifiedTypeName(), getKeywords().getSarlElementTypeAnnotationName()));
		if (annotation != null) {
			final ElementValuePair[] pairs = annotation.elementValues();
			if (pairs != null && pairs.length > 0) {
				return ((Number) pairs[0].value().value()).intValue();
			}
		}
		return null;
	}
939459
public AnnotationTypeDoc annotationType() {
        ClassSymbol atsym = (ClassSymbol)annotation.type.tsym;
        if (annotation.type.isErroneous()) {
            env.warning(null, "javadoc.class_not_found", annotation.type.toString());
            return new AnnotationTypeDocImpl(env, atsym);
        } else {
            return (AnnotationTypeDoc)env.getClassDoc(atsym);
        }
    }
334577
public com.google.api.ads.adwords.axis.v201809.o.AttributeType getKey() {
        return key;
    }