Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.commons.configuration.attributes;

IdentityAttributeCopier. This AttributeCopier does not copy the source attribute, but returns it, so that the same instance can be shared across multiple configurations. Since this can only be safely done with threadsafe objects which store no state, be very careful when using it.

Tristan Tarrant
public class IdentityAttributeCopier<T> implements AttributeCopier<T> {
   public static final AttributeCopier<ObjectINSTANCE = new IdentityAttributeCopier<>();
   private IdentityAttributeCopier() {
      // Singleton constructor
   public T copyAttribute(T attribute) {
      return attribute;
New to GrepCode? Check out our FAQ X