public static <D, V> AnnotationId<D, V> get(
      TypeId<D> declaringType, TypeId<V> type, ElementType annotatedElement) {
    if (annotatedElement != ElementType.TYPE
        && annotatedElement != ElementType.METHOD
        && annotatedElement != ElementType.FIELD
        && annotatedElement != ElementType.PARAMETER) {
      throw new IllegalArgumentException("element type is not supported to annotate yet.");
    }

    return new AnnotationId<>(declaringType, type, annotatedElement);
  }
Construct an instance. It initially contains no elements.

@param declaringType the type declaring the program element.
@param type the annotation type.
@param annotatedElement the program element type to be annotated.
@return an annotation {@code AnnotationId<D,V>} instance.
android/android_framework/dex-maker/src/main/java/com/android/dx/AnnotationId.java