com.avsystem.scex.presentation
Analogous to plus, but used to express wildcards with lower bounds, e.g.
Type annotation that serves as an alternative way of expressing existential types (types with wildcards) with higher bounds in the symbol DSL.
Type annotation that serves as an alternative way of expressing existential types (types with wildcards) with higher bounds in the symbol DSL.
For example, imagine you want to allow invoking insert method on all lists of type java.util.List[_ <: Number]. Unfortunately, the following will NOT work:
allow { on { l: java.util.List[_ <: Number] => l.insert _ // won't typecheck } }
Scala typechecker will report an error on l.insert _ because this method cannot be called when the element type of the list is unknown.
To overcome this limitation, you can use alternative syntax to express the same:
allow { on { l: java.util.List[Number@plus] => l.insert _ } }
Starts "wildcard" notation to allow or deny calling multiple Java static methods, with single DSL statement.
Starts "wildcard" notation to allow or deny calling multiple Java static methods, with single DSL statement. For example:
allStatic[String].membersNamed.valueOf
Starts a block that allows or denies calling some methods on instances of some type.
Starts a block that allows or denies calling some methods on instances of some type. This is expressed using lambda expression like this:
on { s: String => s.compareTo _ s.charAt _ s.length } @param expr @tparam A @return