@Nullable public static String getJvmName(@NotNull Annotated annotated) { AnnotationDescriptor jvmNameAnnotation = getAnnotationByFqName(annotated.getAnnotations(), JVM_NAME); if (jvmNameAnnotation == null) return null; Map<ValueParameterDescriptor, ConstantValue<?>> arguments = jvmNameAnnotation.getAllValueArguments(); if (arguments.isEmpty()) return null; ConstantValue<?> name = arguments.values().iterator().next(); if (!(name instanceof StringValue)) return null; return ((StringValue) name).getValue(); }
@Nullable public static AnnotationDescriptor getSynchronizedAnnotation(@NotNull Annotated annotated) { return getAnnotationByFqName(annotated.getAnnotations(), SYNCHRONIZED); }
@Nullable public static AnnotationDescriptor getVolatileAnnotation(@NotNull Annotated annotated) { return getAnnotationByFqName(annotated.getAnnotations(), VOLATILE); }
@Nullable public static AnnotationDescriptor getJvmNameAnnotation(@NotNull Annotated annotated) { return getAnnotationByFqName(annotated.getAnnotations(), JVM_NAME); }