@java.lang.SuppressWarnings({ "unchecked", "rawtypes" })
public class GroovyPageAttributes
extends TypeConvertingMap
implements java.lang.Cloneable
Defines attributes passed to a GSP tag. Mixes in TypeConvertingMap for ease of type conversion.
| Fields inherited from class | Fields |
|---|---|
class AbstractTypeConvertingMap |
wrappedMap |
| Constructor and description |
|---|
GroovyPageAttributes() |
GroovyPageAttributes(java.util.Map map) |
GroovyPageAttributes(java.util.Map map, boolean gspTagSyntaxCall) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public java.lang.Object |
clone() |
|
public boolean |
gspTagSyntaxCall()Whether the tag was invoked with GSP tag syntax rather than as a method call. |
|
public void |
putAt(java.lang.String key, java.lang.Object value)Stores an attribute, so that attrs['name'] = value always writes a map entry. |
|
public void |
setGspTagSyntaxCall(boolean gspTagSyntaxCall) |
| Methods inherited from class | Name |
|---|---|
class TypeConvertingMap |
boolean, boolean, byte, byte, char, char, char, clone, double, double, float, float, int, int, long, long, short, short, string, string |
class AbstractTypeConvertingMap |
asBoolean, clear, containsKey, containsValue, date, date, date, entrySet, equals, equals, get, getBoolean, getBoolean, getByte, getByte, getChar, getChar, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getList, getLong, getLong, getShort, getShort, getString, getString, hashCode, isEmpty, keySet, list, put, putAll, remove, size, toString, values |
Whether the tag was invoked with GSP tag syntax rather than as a method call.
Deliberately not named isGspTagSyntaxCall(). This class implements java.util.Map,
and a JavaBean accessor on a map shadows the map entry of the same name, which made an
attribute named gspTagSyntaxCall unreadable. See
AbstractTypeConvertingMap for the rule.
true when invoked with GSP tag syntax Stores an attribute, so that attrs['name'] = value always writes a map entry.
Without it, Groovy 5 resolves subscript assignment of gspTagSyntaxCall to
setGspTagSyntaxCall(boolean), while Groovy 6 routes it through java.util.Map#put.
Declaring it gives both the Groovy 6 behaviour. Dotted assignment,
attrs.gspTagSyntaxCall = value, still invokes the setter.
key - the attribute namevalue - the attribute value