Instruction i;
List paramsList = new ArrayList(params);
Collections.sort(paramsList);
for (int j = 0; j < paramsList.size(); j++) {
YVariable parameter = (YVariable) paramsList.get(j);
if (parameter.usesElementDeclaration()) {
i = new ElementReuseInstruction(
parameter.getElementName());
instructions.add(i);
}
if (parameter.usesTypeDeclaration()) {
boolean isBuiltInSchemaType =
null != parameter.getDataTypeNameSpace() &&
parameter.getDataTypeNameSpace().equals(
XMLToolsForYAWL.getSchema4SchemaNameSpace());
i = new ElementCreationInstruction(
parameter.getName(),
parameter.getDataTypeName(),
isBuiltInSchemaType);
instructions.add(i);
}
if (parameter.isUntyped()) {
i = new UntypedElementInstruction();
instructions.add(i);
}
}
Instruction[] instructionsArr;