Package org.openrewrite.polyglot
Class PolyglotUtils
- java.lang.Object
-
- org.openrewrite.polyglot.PolyglotUtils
-
public class PolyglotUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PolyglotUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetLanguage(java.lang.String source)static java.lang.StringgetLanguage(org.graalvm.polyglot.Source source)static java.lang.StringgetName(org.graalvm.polyglot.Value value)static java.util.Optional<org.graalvm.polyglot.Value>getValue(org.graalvm.polyglot.Value value, java.lang.String memberKey)static <O> OinvokeMemberOrElse(org.graalvm.polyglot.Value value, java.lang.String member, @Nullable java.util.function.Supplier<O> superFn)static <TREE extends Tree,CTX>
TREEinvokeMemberOrElse(org.graalvm.polyglot.Value value, java.lang.String member, TREE tree, CTX ctx, java.util.function.BiFunction<TREE,CTX,TREE> superFn)
-
-
-
Field Detail
-
JS
public static final java.lang.String JS
- See Also:
- Constant Field Values
-
PYTHON
public static final java.lang.String PYTHON
- See Also:
- Constant Field Values
-
PY
public static final java.lang.String PY
- See Also:
- Constant Field Values
-
PYC
public static final java.lang.String PYC
- See Also:
- Constant Field Values
-
LLVM
public static final java.lang.String LLVM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLanguage
public static java.lang.String getLanguage(java.lang.String source)
-
getLanguage
public static java.lang.String getLanguage(org.graalvm.polyglot.Source source)
-
getName
public static java.lang.String getName(org.graalvm.polyglot.Value value)
-
getValue
public static java.util.Optional<org.graalvm.polyglot.Value> getValue(org.graalvm.polyglot.Value value, java.lang.String memberKey)
-
invokeMemberOrElse
@Nullable public static <O> O invokeMemberOrElse(org.graalvm.polyglot.Value value, java.lang.String member, @Nullable @Nullable java.util.function.Supplier<O> superFn)
-
-