コード例 #1
0
  private void renderAnnotations(@NotNull Annotated annotated, @NotNull StringBuilder builder) {
    if (!modifiers.contains(Modifier.ANNOTATIONS)) return;
    for (AnnotationDescriptor annotation : annotated.getAnnotations()) {
      ClassDescriptor annotationClass =
          (ClassDescriptor) annotation.getType().getConstructor().getDeclarationDescriptor();
      assert annotationClass != null;

      if (!excludedAnnotationClasses.contains(
          DescriptorUtils.getFQName(annotationClass).toSafe())) {
        builder.append(renderType(annotation.getType()));
        if (verbose) {
          builder
              .append("(")
              .append(
                  StringUtil.join(DescriptorUtils.getSortedValueArguments(annotation, this), ", "))
              .append(")");
        }
        builder.append(" ");
      }
    }
  }
コード例 #2
0
 @Override
 public String toString() {
   return annotationType.toString() + DescriptorUtils.getSortedValueArguments(this);
 }