@SuppressWarnings("unchecked")
public static String genEventSink(CommonTree t) throws FlumeSpecException {
if (t == null) {
throw new FlumeSpecException("Tree is null");
}
ASTNODE type = ASTNODE.valueOf(t.getText()); // convert to enum
switch (type) {
case SINK:
// copy so we don't modify original
List<CommonTree> children = (List<CommonTree>) new ArrayList<CommonTree>(
t.getChildren());