public class Weaver extends Object
Constructor and Description |
---|
Weaver() |
Modifier and Type | Method and Description |
---|---|
static <T> Callable<T> |
inline(String code,
Map<String,?> bindings) |
static <T> Callable<T> |
inline(String code,
Map<String,?> bindings,
boolean showJavaCode) |
static <T> Callable<T> |
inline(String code,
Map<String,?> bindings,
Class<T> returnType) |
static <T> Callable<T> |
inline(String code,
Map<String,?> bindings,
Class<T> returnType,
boolean showJavaCode) |
static <T> Callable<T> |
inline(String code,
Map<String,?> bindings,
Class<T> returnType,
boolean showJavaCode,
List<Class<?>> imports) |
static <T> Callable<T> |
inline(String code,
Map<String,?> bindings,
Class<T> returnType,
List<Class<?>> imports) |
static <T> Callable<T> |
inline(String code,
Map<String,?> bindings,
List<Class<?>> imports) |
static Object |
method(String method) |
static Object |
method(String method,
List<Class<?>> imports) |
static Object |
method(String method,
List<Class<?>> imports,
boolean showJavaCode)
Define a method or methods, have an instance of an object implementing the method(s) returned to you.
|
static Object |
steal(String className,
String binding) |
public static final <T> Callable<T> inline(String code, Map<String,?> bindings) throws Throwable
Throwable
public static final <T> Callable<T> inline(String code, Map<String,?> bindings, boolean showJavaCode) throws Throwable
Throwable
public static final <T> Callable<T> inline(String code, Map<String,?> bindings, Class<T> returnType) throws Throwable
Throwable
public static final <T> Callable<T> inline(String code, Map<String,?> bindings, Class<T> returnType, List<Class<?>> imports) throws Throwable
Throwable
public static final <T> Callable<T> inline(String code, Map<String,?> bindings, List<Class<?>> imports) throws Throwable
Throwable
public static final <T> Callable<T> inline(String code, Map<String,?> bindings, Class<T> returnType, boolean showJavaCode) throws Throwable
Throwable
public static final <T> Callable<T> inline(String code, Map<String,?> bindings, Class<T> returnType, boolean showJavaCode, List<Class<?>> imports) throws Throwable
Throwable
public static Object method(String method, List<Class<?>> imports) throws Throwable
Throwable
public static Object method(String method, List<Class<?>> imports, boolean showJavaCode) throws Throwable
method
- The declaration(s) of the java method(s) to implement.imports
- The list of imports to add to the .java file.showJavaCode
- Whether or not to show the generated code in a Script Editor window.Throwable
Copyright © 2015–2021 Fiji. All rights reserved.