@GwtCompatible public final class SafeScripts extends Object
SafeScript
.Modifier and Type | Method and Description |
---|---|
static SafeScript |
fromConstant(String script)
Creates a SafeScript from the given compile-time constant string
script . |
static SafeScript |
fromProto(SafeScriptProto proto)
Deserializes a SafeScriptProto into a SafeScript instance.
|
static SafeScriptProto |
toProto(SafeScript script)
Serializes a SafeScript into its opaque protocol message representation.
|
public static SafeScript fromConstant(@CompileTimeConstant String script)
script
.public static SafeScript fromProto(SafeScriptProto proto)
Protocol-message forms are intended to be opaque. The fields of the protocol message should
be considered encapsulated and are not intended for direct inspection or manipulation. Protocol
message forms of this type should be produced by toProto(SafeScript)
or its equivalent
in other implementation languages.
Important: It is unsafe to invoke this method on a protocol message that has been received from an entity outside the application's trust domain. Data coming from the browser is outside the application's trust domain.
public static SafeScriptProto toProto(SafeScript script)
Protocol message forms of this type are intended to be opaque. The fields of the returned
protocol message should be considered encapsulated and are not intended for direct inspection
or manipulation. Protocol messages can be converted back into a SafeScript using
fromProto(SafeScriptProto)
.