code: public boolean isMarshallable(final AttributeDefinition attribute, final ModelNode resourceModel, final boolean marshallDefault) {
          return resourceModel.hasDefined(attribute.getName()) && (marshallDefault || !resourceModel.get(attribute.getName()).equals(attribute.getDefaultValue()));
      }
docs: Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML.
  
  @param attribute - attribute for which marshaling is being done
  @param resourceModel   the model, a non-null node of {@link org.jboss.dmr.ModelType#OBJECT}.
  @param marshallDefault {@code true} if the value should be marshalled even if it matches the default value
  @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link AttributeDefinition#getName()} () name}
  and {@code marshallDefault} is {@code true} or that value differs from this attribute's {@link AttributeDefinition#getDefaultValue() default value}.