public static final class IV8ValueFunction.SetSourceCodeOptions
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static IV8ValueFunction.SetSourceCodeOptions |
DEFAULT
The constant DEFAULT with all options disabled.
|
static IV8ValueFunction.SetSourceCodeOptions |
GC
The constant GC with PreGC and PostGC enabled.
|
static IV8ValueFunction.SetSourceCodeOptions |
NATIVE_GC
The constant NATIVE_GC with PreGC, PostGC and NativeCalculation enabled.
|
Modifier and Type | Method and Description |
---|---|
protected IV8ValueFunction.SetSourceCodeOptions |
clone() |
boolean |
isCloneScript()
CloneScript: Clone the script so that the original script is not affected.
|
boolean |
isNativeCalculation()
NativeCalculation: The position calculation is performed at the native layer.
|
boolean |
isPostGC()
PostGC: The GC is called after the set call happens.
|
boolean |
isPreGC()
PreGC: The GC is called before the set call happens.
|
boolean |
isTrimTailingCharacters()
TrimTailingCharacters: Sometimes the source code must not end with ' ', '\n', '\r', 't', ';',
otherwise, V8 will crash immediately.
|
IV8ValueFunction.SetSourceCodeOptions |
withCloneScript(boolean cloneScript)
Returns a new immutable options with CloneScript set.
|
IV8ValueFunction.SetSourceCodeOptions |
withNativeCalculation(boolean nativeCalculation)
Returns a new immutable options with NativeCalculation set.
|
IV8ValueFunction.SetSourceCodeOptions |
withPostGC(boolean postGC)
Returns a new immutable options with PostGC set.
|
IV8ValueFunction.SetSourceCodeOptions |
withPreGC(boolean preGC)
Returns a new immutable options with PreGC set.
|
IV8ValueFunction.SetSourceCodeOptions |
withTrimTailingCharacters(boolean trimTrailingCharacters)
Returns a new immutable options with TrimTrailingCharacters set.
|
public static final IV8ValueFunction.SetSourceCodeOptions DEFAULT
public static final IV8ValueFunction.SetSourceCodeOptions GC
public static final IV8ValueFunction.SetSourceCodeOptions NATIVE_GC
protected IV8ValueFunction.SetSourceCodeOptions clone()
clone
in class java.lang.Object
public boolean isCloneScript()
When this option is turned on, it is called LiveEdit in V8.
public boolean isNativeCalculation()
public boolean isPostGC()
public boolean isPreGC()
public boolean isTrimTailingCharacters()
public IV8ValueFunction.SetSourceCodeOptions withCloneScript(boolean cloneScript)
cloneScript
- the clone scriptpublic IV8ValueFunction.SetSourceCodeOptions withNativeCalculation(boolean nativeCalculation)
nativeCalculation
- the native calculationpublic IV8ValueFunction.SetSourceCodeOptions withPostGC(boolean postGC)
postGC
- the post gcpublic IV8ValueFunction.SetSourceCodeOptions withPreGC(boolean preGC)
preGC
- the pre gcpublic IV8ValueFunction.SetSourceCodeOptions withTrimTailingCharacters(boolean trimTrailingCharacters)
trimTrailingCharacters
- the trim trailing characters