Uses of Class
org.codehaus.commons.compiler.sandbox.SandboxPolicy.Builder
Packages that use SandboxPolicy.Builder
Package
Description
Restricts the APIs that compiled, untrusted code may use, by verifying the generated bytecode against an allowlist
before it is loaded (
SandboxPolicy), and limits the CPU time and the
memory that the code consumes (SandboxExecutor).-
Uses of SandboxPolicy.Builder in org.codehaus.commons.compiler.sandbox
Methods in org.codehaus.commons.compiler.sandbox that return SandboxPolicy.BuilderModifier and TypeMethodDescriptionSandboxPolicy.Builder.allowAllMembers(String... classNames) Allows all fields, methods and constructors that the given classes declare, except the never-allowed ones.SandboxPolicy.Builder.allowConstructors(String... classNames) Allows all constructors of the given classes, except the never-allowed ones.SandboxPolicy.Builder.allowField(String className, String name) Allows reading and writing the named field of the class.SandboxPolicy.Builder.allowMethod(String className, String name, String descriptor) Allows one method or constructor.SandboxPolicy.Builder.allowMethods(String className, String... names) Allows all overloads of the named methods of the class.SandboxPolicy.Builder.allowSubclassing(String... classNames) Allows sandboxed code to declare classes that extend or implement the given classes or interfaces.static SandboxPolicy.BuilderSandboxPolicy.builder()SandboxPolicy.Builder.include(SandboxPolicy policy) Adds all rules of the given policy, e.g. ofSandboxPolicy.JAVA_LANG_BASIC, and requires an executor if the policy does.SandboxPolicy.Builder.requireExecutor()Requires that code that JANINO compiles with this policy is executed only by aSandboxExecutor.