194 * @param get property getter, or null if none 195 * @param set property setter, or null if none 196 * @param configurable is the described property configurable 197 * @param enumerable is the described property enumerable 198 * 199 * @return property descriptor 200 */ 201 public PropertyDescriptor newAccessorDescriptor(Object get, Object set, boolean configurable, boolean enumerable); 202 203 /** 204 * Wrapper for {@link jdk.nashorn.internal.objects.Global#getDefaultValue(ScriptObject, Class)} 205 * 206 * @param sobj script object 207 * @param typeHint type hint 208 * 209 * @return default value 210 */ 211 public Object getDefaultValue(ScriptObject sobj, Class<?> typeHint); 212 213 /** 214 * Find the compiled Class for the given script source, if available 215 * 216 * @param source Source object of the script 217 * @return compiled Class object or null 218 */ 219 public Class<?> findCachedClass(Source source); 220 221 /** 222 * Put the Source associated Class object in the Source-to-Class cache 223 * 224 * @param source Source of the script 225 * @param clazz compiled Class object for the source 226 */ 227 public void cacheClass(Source source, Class<?> clazz); 228 229 /** 230 * Get cached InvokeByName object for the given key 231 * @param key key to be associated with InvokeByName object 232 * @param creator if InvokeByName is absent 'creator' is called to make one (lazy init) 233 * @return InvokeByName object associated with the key. 234 */ 235 public InvokeByName getInvokeByName(final Object key, final Callable<InvokeByName> creator); 236 237 /** 238 * Get cached dynamic method handle for the given key 239 * @param key key to be associated with dynamic method handle 240 * @param creator if method handle is absent 'creator' is called to make one (lazy init) 241 * @return dynamic method handle associated with the key. 242 */ 243 public MethodHandle getDynamicInvoker(final Object key, final Callable<MethodHandle> creator); 244 } | 194 * @param get property getter, or null if none 195 * @param set property setter, or null if none 196 * @param configurable is the described property configurable 197 * @param enumerable is the described property enumerable 198 * 199 * @return property descriptor 200 */ 201 public PropertyDescriptor newAccessorDescriptor(Object get, Object set, boolean configurable, boolean enumerable); 202 203 /** 204 * Wrapper for {@link jdk.nashorn.internal.objects.Global#getDefaultValue(ScriptObject, Class)} 205 * 206 * @param sobj script object 207 * @param typeHint type hint 208 * 209 * @return default value 210 */ 211 public Object getDefaultValue(ScriptObject sobj, Class<?> typeHint); 212 213 /** 214 * Get cached InvokeByName object for the given key 215 * @param key key to be associated with InvokeByName object 216 * @param creator if InvokeByName is absent 'creator' is called to make one (lazy init) 217 * @return InvokeByName object associated with the key. 218 */ 219 public InvokeByName getInvokeByName(final Object key, final Callable<InvokeByName> creator); 220 221 /** 222 * Get cached dynamic method handle for the given key 223 * @param key key to be associated with dynamic method handle 224 * @param creator if method handle is absent 'creator' is called to make one (lazy init) 225 * @return dynamic method handle associated with the key. 226 */ 227 public MethodHandle getDynamicInvoker(final Object key, final Callable<MethodHandle> creator); 228 } |