Class JsInteropAnnotationUtils
java.lang.Object
com.google.j2cl.transpiler.frontend.javac.JsInteropAnnotationUtils
Utility methods to get information about Js Interop annotations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stream<com.sun.tools.javac.code.Attribute.Compound>getDeclarationAndTypeAttributes(com.sun.tools.javac.code.Symbol sym) Helper method to recover annotations through looking at the internal representation.static AnnotationMirrorgetDoNotAutoboxAnnotation(ExecutableElement methodBinding, int parameterIndex) static AnnotationMirrorgetJsAsyncAnnotation(AnnotatedConstruct methodBinding) static AnnotationMirrorgetJsConstructorAnnotation(AnnotatedConstruct methodBinding) static AnnotationMirrorgetJsEnumAnnotation(AnnotatedConstruct typeBinding) static AnnotationMirrorgetJsFunctionAnnotation(AnnotatedConstruct typeBinding) static AnnotationMirrorgetJsIgnoreAnnotation(AnnotatedConstruct methodBinding) static AnnotationMirrorgetJsMethodAnnotation(AnnotatedConstruct methodBinding) static StringgetJsName(AnnotatedConstruct typeBinding) static StringgetJsName(AnnotationMirror annotationBinding) static StringgetJsNamespace(AnnotatedConstruct typeBinding) The namespace specified on a package, type, method or field.static StringgetJsNamespace(AnnotationMirror annotationBinding) static AnnotationMirrorgetJsOptionalAnnotation(ExecutableElement methodBinding, int parameterIndex) static AnnotationMirrorgetJsOverlayAnnotation(AnnotatedConstruct methodBinding) static AnnotationMirrorgetJsPackageAnnotation(AnnotatedConstruct methodBinding) static AnnotationMirrorgetJsPropertyAnnotation(AnnotatedConstruct methodBinding) static AnnotationMirrorgetJsTypeAnnotation(AnnotatedConstruct typeBinding) static booleanhasCustomValue(AnnotatedConstruct typeBinding) static booleanisJsNative(AnnotatedConstruct typeBinding) static booleanisJsPackageAnnotation(AnnotationMirror annotation) static boolean
-
Method Details
-
getJsAsyncAnnotation
-
getJsConstructorAnnotation
-
getJsEnumAnnotation
-
getJsFunctionAnnotation
-
getJsIgnoreAnnotation
-
getJsTypeAnnotation
-
getJsMethodAnnotation
-
getJsPackageAnnotation
-
getJsPropertyAnnotation
-
getJsOptionalAnnotation
public static AnnotationMirror getJsOptionalAnnotation(ExecutableElement methodBinding, int parameterIndex) -
getDoNotAutoboxAnnotation
public static AnnotationMirror getDoNotAutoboxAnnotation(ExecutableElement methodBinding, int parameterIndex) -
getJsOverlayAnnotation
-
getDeclarationAndTypeAttributes
public static Stream<com.sun.tools.javac.code.Attribute.Compound> getDeclarationAndTypeAttributes(com.sun.tools.javac.code.Symbol sym) Helper method to recover annotations through looking at the internal representation.TODO(b/136507005): Javac does not keep annotations accessible for types outside compilation. boundaries.
-
isJsPackageAnnotation
-
isJsNative
-
isUnusableByJsSuppressed
-
getJsNamespace
The namespace specified on a package, type, method or field. -
getJsNamespace
-
getJsName
-
getJsName
-
hasCustomValue
-