code: public static ObjectTypeAttributeDefinition.Builder getAttributeBuilder(String name, String xmlName, boolean allowNull,
                                                                              CapabilityReferenceRecorder capabilityStoreReferenceRecorder) {
          if (capabilityStoreReferenceRecorder == null) {
              return getAttributeBuilder(name, xmlName, allowNull, false);
          }
  
          assert CREDENTIAL_STORE_CAPABILITY.equals(capabilityStoreReferenceRecorder.getBaseRequirementName());
          AttributeDefinition csAttr = new SimpleAttributeDefinitionBuilder(credentialStoreAttribute)
                  .setCapabilityReference(capabilityStoreReferenceRecorder)
                  .build();
          return getAttributeBuilder(name, xmlName, allowNull, csAttr);
      }
docs: Get an attribute builder for a credential-reference attribute with the specified characteristics, optionally configured to
  {@link org.jboss.as.controller.AbstractAttributeDefinitionBuilder#setCapabilityReference(CapabilityReferenceRecorder)} register a requirement}
  for a {@link #CREDENTIAL_STORE_CAPABILITY credential store capability}.
  
  @param name name of attribute
  @param xmlName name of xml element
  @param allowNull {@code false} if the attribute is required
  @param capabilityStoreReferenceRecorder a capability reference recorder that can record a requirement
  for the credential store referenced by the {@code store}
  field of the returned attribute definition. Can be {@code null},
  in which case no requirement would be recorded. If not {@code null}
  the recorder's
  {@link CapabilityReferenceRecorder#getBaseRequirementName() base requirement name}
  must equal {@link #CREDENTIAL_STORE_CAPABILITY}
  
  @return an {@link ObjectTypeAttributeDefinition.Builder} which can be used to build attribute definition