private ArrayList<AuthenticationMechanism> processAuthenticationMechanism( javax.resource.spi.AuthenticationMechanism[] authMechanismAnnotations) { ArrayList<AuthenticationMechanism> authenticationMechanisms = null; if (authMechanismAnnotations != null) { authenticationMechanisms = new ArrayList<AuthenticationMechanism>(authMechanismAnnotations.length); for (javax.resource.spi.AuthenticationMechanism authMechanismAnnotation : authMechanismAnnotations) { ArrayList<LocalizedXsdString> descriptions = null; if (authMechanismAnnotation.description() != null && authMechanismAnnotation.description().length != 0) { descriptions = new ArrayList<LocalizedXsdString>(authMechanismAnnotation.description().length); for (String descriptionAnnoptation : authMechanismAnnotation.description()) { descriptions.add(new LocalizedXsdString(descriptionAnnoptation, null)); } } XsdString authenticationMechanismType = new XsdString(authMechanismAnnotation .authMechanism(), null); authenticationMechanisms.add(new AuthenticationMechanismImpl(descriptions, authenticationMechanismType, CredentialInterfaceEnum .valueOf(authMechanismAnnotation .credentialInterface() .name()), null, null)); } } return authenticationMechanisms; }