org.ucmtwine.parameter.types
Class InjectedParameter
java.lang.Object
org.ucmtwine.parameter.Parameter
org.ucmtwine.parameter.types.InjectedParameter
- All Implemented Interfaces:
- IParameter
public class InjectedParameter
- extends Parameter
Place-holder parameter which doesn't retrieve it's value from the binder,
rather is injected when enumerating the parameter list before invocation.
- Author:
- tim
| Methods inherited from class org.ucmtwine.parameter.Parameter |
create, create, create, getName, getStringValue, getType, isRequired, parseRequiredString, setName, setRequired, toActionString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InjectedParameter
public InjectedParameter(String name,
Class<?> type)
getBinderValue
public Object getBinderValue(intradoc.server.Service service)
throws IllegalAccessException
- Returns null because the type should be injected rather than retrieved.
This is a place-holder not a value retrieval.
- Specified by:
getBinderValue in interface IParameter- Specified by:
getBinderValue in class Parameter
- Parameters:
service - The execution context.
- Returns:
- A type cast value or null
- Throws:
IllegalAccessException
getArgumentValue
public Object getArgumentValue(Object object,
intradoc.server.Service service)
throws ClassCastException
- Get the value from another object, casting if needed.
- Specified by:
getArgumentValue in interface IParameter- Overrides:
getArgumentValue in class Parameter
- Returns:
-
- Throws:
ClassCastException
getInjectedValue
protected Object getInjectedValue(intradoc.server.Service service)
- Special case for Injectable type. Injects the required parameter from the
ExecutionContext (service)
- Parameters:
service -
- Returns:
getGrammarElementType
public int getGrammarElementType()
- Returns the GrammarElement type for use in idoc script function
definitions.
- Returns:
isValidType
public static boolean isValidType(Class<?> type)
Copyright © 2012. All Rights Reserved.