public static boolean parse(XMLStreamReader reader, EnvironmentRefsGroupMetaData env) throws XMLStreamException {
// Only look at the current element, no iteration
final Element element = Element.forName(reader.getLocalName());
switch (element) {
case ENV_ENTRY:
EnvironmentEntriesMetaData envEntries = env.getEnvironmentEntries();
if (envEntries == null) {
envEntries = new EnvironmentEntriesMetaData();
env.setEnvironmentEntries(envEntries);
}
envEntries.add(EnvironmentEntryMetaDataParser.parse(reader));
break;
case EJB_REF:
EJBReferencesMetaData ejbReferences = env.getEjbReferences();
if (ejbReferences == null) {
ejbReferences = new EJBReferencesMetaData();