}
}
Node letclass = GNode.create("ClassBody");
letclass = GNode.ensureVariable((GNode)letclass);
GNode letbody = GNode.create("Block");
for (int i = 0; i < size; i++) {
Node binding = bindings.getGeneric(i);
Node left = binding.getGeneric(0);
Node right = binding.getGeneric(1);
if (n.hasProperty(INANALYZE)) right.setProperty(INANALYZE, Boolean.TRUE);
String bname;
Object btype;
right = (Node)dispatch(right);
if (left.hasName("Variable")) {
bname = left.getString(0);
btype = left.getProperty(TYPE);
letclass.add(makeVarDec2(bname, mapper.toTypeNode(btype, false) , null));
// fix cast here
if (mapper.hasTypeVariables(btype)) {
letbody.add(factory.assign(toIdentifier(bname), right));
} else {
letbody.add(factory.assign(toIdentifier(bname), factory.cast(right)));
}
} else if ("TypedPattern".equals(left.getName()) &&
"Variable".equals(left.getGeneric(0).getName())) {
bname = left.getGeneric(0).getString(0);
btype = left.getProperty(TYPE);
letclass.add(makeVarDec2(bname, mapper.toTypeNode(btype, false), null));
// fix cast here
if (mapper.hasTypeVariables(btype)) {
letbody.add(factory.assign(toIdentifier(bname),right));
} else {
letbody.add(factory.assign(toIdentifier(bname),factory.cast(right)));
}
} else {
if (right.hasName("ConditionalExpression")) {
letbody.add(factory.discard(right));
} else {
letbody.add(factory.expressionStmnt(right));
}
}
}
if (letbody.size() > 0) {
letclass.add(letbody);
}
letclass.add(GNode.create("MethodDeclaration",
toModifiers("public"),null, mapper.toTypeNode(resultType, false),