Package org.apache.tapestry5.internal
Class EmptyEventContext
- java.lang.Object
-
- org.apache.tapestry5.internal.EmptyEventContext
-
- All Implemented Interfaces:
EventContext
public class EmptyEventContext extends Object implements EventContext
Placeholder used when no context is available.
-
-
Constructor Summary
Constructors Constructor Description EmptyEventContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(Class<T> desiredType, int index)
This should never be called because the count is always zero.int
getCount()
Always returns zero.String[]
toStrings()
Extracts the value of each context value as a string.
-
-
-
Constructor Detail
-
EmptyEventContext
public EmptyEventContext()
-
-
Method Detail
-
getCount
public int getCount()
Always returns zero.- Specified by:
getCount
in interfaceEventContext
-
get
public <T> T get(Class<T> desiredType, int index)
This should never be called because the count is always zero.- Specified by:
get
in interfaceEventContext
- Parameters:
desiredType
- the type of value requiredindex
- identifies which parameter value to extract- Returns:
- the value extracted and converted or coerced
-
toStrings
public String[] toStrings()
Description copied from interface:EventContext
Extracts the value of each context value as a string.- Specified by:
toStrings
in interfaceEventContext
- Returns:
- context values
-
-