Closure and
convert the result to a boolean. It will do this by caching the possible "doCall"
as well as the "asBoolean" in CallSiteArray fashion. "asBoolean" will not be
called if the result is null or a Boolean. In case of null we return false and
in case of a Boolean we simply unbox. This logic is designed after the one present
in org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation#castToBoolean(Object) . The purpose of
this class is to avoid the slow "asBoolean" call in that method.
BooleanReturningMethodInvoker is used for caching.
| Modifier and Type | Field and Description |
|---|---|
| private final BooleanReturningMethodInvoker | |
| private final int | |
| private final Closure |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public <K, V> boolean |
| bmi | back to summary |
|---|---|
| private final BooleanReturningMethodInvoker bmi | |
| numberOfArguments | back to summary |
|---|---|
| private final int numberOfArguments | |
| wrapped | back to summary |
|---|---|
| private final Closure<V> wrapped | |
| BooleanClosureWrapper | back to summary |
|---|---|
| public BooleanClosureWrapper(Closure<V> wrapped) | |
| call | back to summary |
|---|---|
| public boolean call(Object... args) normal closure call | |
| callForMap | back to summary |
|---|---|
| public <K, V> boolean callForMap(Map. Bridge for a call based on a map entry. If the call is done on a | |