FileDocCategorySizeDatePackage
ProgramPort.javaAPI DocAndroid 5.1 API1962Thu Mar 12 22:22:30 GMT 2015android.filterfw.core

ProgramPort

public class ProgramPort extends FieldPort
hide

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.StringtoString()

        return "Program " + super.toString();
    
public synchronized voidtransfer(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!");
            }
        }