List<JExpression> initializers = new ArrayList<JExpression>();
for (JEnumField field : type.getEnumList()) {
JFieldRef fieldRef = new JFieldRef(fieldInfo, null, field, type);
initializers.add(fieldRef);
}
JNewArray newExpr = JNewArray.createInitializers(fieldInfo,
enumArrayType, initializers);
JFieldRef valuesRef = new JFieldRef(fieldInfo, null, valuesField, type);
JDeclarationStatement declStmt = new JDeclarationStatement(fieldInfo,
valuesRef, newExpr);
JBlock clinitBlock = ((JMethodBody) type.getMethods().get(0).getBody()).getBlock();