@Override public void addForwardedField1(int sourceField, int destinationField) { if (this.nonForwardedFields1 == null) { super.addForwardedField1(sourceField, destinationField); } else { throw new UnsupportedOperationException("When defining fields as implicitly constant for an input" + "(such as through the ConstantFieldsFirstExcept annotation), you cannot manually add forwarded fields."); } }
@Override public void addForwardedField1(int sourceField, FieldSet destinationFields) { if (this.nonForwardedFields1 == null) { super.addForwardedField1(sourceField, destinationFields); } else { throw new UnsupportedOperationException("When defining fields as implicitly constant for an input" + "(such as through the ConstantFieldsFirstExcept annotation), you cannot manually add forwarded fields."); } }
@Override public void setForwardedField1(int sourceField, FieldSet destinationFields) { if (this.nonForwardedFields1 == null) { super.addForwardedField1(sourceField, destinationFields); } else { throw new UnsupportedOperationException("When defining fields as implicitly constant for an input" + "(such as through the ConstantFieldsFirstExcept annotation), you cannot manually add forwarded fields."); } }
private static void parseConstantFieldsFirstExcept(String[] cffe, DualInputSemanticProperties dm, TypeInformation<?> inType, TypeInformation<?> outType) { if (cffe == null) { return; } for (String str : cffe) { if (str == null) { continue; } FieldSet fs = readFieldSetFromString(str, inType, outType); for (int i = 0; i < outType.getArity(); i++) { if (!fs.contains(i)) { dm.addForwardedField1(i, i); } } } }
for (int i = 0; i < inType.getArity() && i < outType.getArity(); i++) { if (input == 0) { ((DualInputSemanticProperties) sp).addForwardedField1(i, i); } else if (input == 1) { ((DualInputSemanticProperties) sp).addForwardedField2(i, i); for (int i = 0; i < outType.getArity(); i++) { if (input == 0) { ((DualInputSemanticProperties) sp).addForwardedField1(sourceField, i); } else if (input == 1) { ((DualInputSemanticProperties) sp).addForwardedField2(sourceField, i); } else if (sp instanceof DualInputSemanticProperties) { if (input == 0) { ((DualInputSemanticProperties) sp).addForwardedField1(sourceField, fs); } else if (input == 1) { ((DualInputSemanticProperties) sp).addForwardedField2(sourceField, fs); } else if (sp instanceof DualInputSemanticProperties) { if (input == 0) { ((DualInputSemanticProperties) sp).addForwardedField1(i, i); } else if (input == 1) { ((DualInputSemanticProperties) sp).addForwardedField2(i, i);