Class ProxyWhitelist
java.lang.Object
org.jenkinsci.plugins.scriptsecurity.sandbox.Whitelist
org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.ProxyWhitelist
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
GenericWhitelist
,ScriptApproval.ApprovedWhitelist
Aggregates several whitelists.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionProxyWhitelist
(Collection<? extends Whitelist> delegates) ProxyWhitelist
(Whitelist... delegates) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Called beforepermitsMethod(java.lang.reflect.Method, java.lang.Object, java.lang.Object[])
and similar methods.final boolean
permitsConstructor
(Constructor<?> constructor, Object[] args) final boolean
permitsFieldGet
(Field field, Object receiver) final boolean
permitsFieldSet
(Field field, Object receiver, Object value) final boolean
permitsMethod
(Method method, Object receiver, Object[] args) Checks whether a given virtual method may be invoked.final boolean
permitsStaticFieldGet
(Field field) final boolean
permitsStaticFieldSet
(Field field, Object value) final boolean
permitsStaticMethod
(Method method, Object[] args) final void
reset
(Collection<? extends Whitelist> delegates) toString()
-
Constructor Details
-
ProxyWhitelist
-
ProxyWhitelist
-
-
Method Details
-
reset
-
beforePermits
protected void beforePermits()Called beforepermitsMethod(java.lang.reflect.Method, java.lang.Object, java.lang.Object[])
and similar methods. May callreset(Collection)
. -
permitsMethod
public final boolean permitsMethod(@NonNull Method method, @NonNull Object receiver, @NonNull Object[] args) Description copied from class:Whitelist
Checks whether a given virtual method may be invoked.Note that
method
should not be implementing or overriding a method in a supertype; in such a case the caller must pass that supertype method instead. In other words, call site selection is the responsibility of the caller (such asGroovySandbox
), not the whitelist.- Specified by:
permitsMethod
in classWhitelist
- Parameters:
method
- a method defined in the JVMreceiver
-this
, the receiver of the method callargs
- zero or more arguments- Returns:
- true to allow the method to be called, false to reject it
-
permitsConstructor
public final boolean permitsConstructor(@NonNull Constructor<?> constructor, @NonNull Object[] args) - Specified by:
permitsConstructor
in classWhitelist
-
permitsStaticMethod
- Specified by:
permitsStaticMethod
in classWhitelist
-
permitsFieldGet
- Specified by:
permitsFieldGet
in classWhitelist
-
permitsFieldSet
- Specified by:
permitsFieldSet
in classWhitelist
-
permitsStaticFieldGet
- Specified by:
permitsStaticFieldGet
in classWhitelist
-
permitsStaticFieldSet
- Specified by:
permitsStaticFieldSet
in classWhitelist
-
toString
-