Class ModifiableArrayCaster
java.lang.Object
ortus.boxlang.runtime.dynamic.casters.ModifiableArrayCaster
- All Implemented Interfaces:
IBoxCaster
I handle casting anything to a Array that needs to be modifiable
This means I reject
- Native Java arrays
- ImmutableLists
- UmmodifiableLists
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CastAttempt<Array> Tests to see if the value can be cast to a Array.static ArrayUsed to cast anything to a Array, throwing exception if we failstatic ArrayUsed to cast anything to a Array that needs to be modifiable
-
Constructor Details
-
ModifiableArrayCaster
public ModifiableArrayCaster()
-
-
Method Details
-
attempt
Tests to see if the value can be cast to a Array. Returns aCastAttempt<T>which will contain the result if casting was was successfull, or can be interogated to proceed otherwise.- Parameters:
object- The value to cast to a Array- Returns:
- The Array value
-
cast
Used to cast anything to a Array, throwing exception if we fail- Parameters:
object- The value to cast to a Array- Returns:
- The Array value
-
cast
Used to cast anything to a Array that needs to be modifiable- Parameters:
object- The value to cast to a Arrayfail- True to throw exception when failing.- Returns:
- The Array value
-