ProgramPortpublic class ProgramPort extends FieldPort
Fields Summary |
---|
protected String | mVarName |
Constructors Summary |
---|
public ProgramPort(Filter filter, String name, String varName, Field field, boolean hasDefault)
super(filter, name, field, hasDefault);
mVarName = varName;
|
Methods Summary |
---|
public java.lang.String | toString()
return "Program " + super.toString();
| public synchronized void | transfer(FilterContext context)
if (mValueWaiting) {
try {
Object fieldValue = mField.get(mFilter);
if (fieldValue != null) {
Program program = (Program)fieldValue;
program.setHostValue(mVarName, mValue);
mValueWaiting = false;
}
} catch (IllegalAccessException e) {
throw new RuntimeException(
"Access to program field '" + mField.getName() + "' was denied!");
} catch (ClassCastException e) {
throw new RuntimeException("Non Program field '" + mField.getName()
+ "' annotated with ProgramParameter!");
}
}
|
|