public static <A> A getOptionalAttachment(final DeploymentUnit unit, final AttachmentKey<A> key) {
    """
	Returns optional attachment value from deployment unit or null if not bound.
	
	@param <A> expected value
	@param unit deployment unit
	@param key attachment key
	@return optional attachment value or null
    """
        return unit.getAttachment(key);
    }
public static <A> A getOptionalAttachment(final DeploymentUnit unit, final AttachmentKey<A> key) {
        return unit.getAttachment(key);
    }
public static < A > A getOptionalAttachment ( final DeploymentUnit unit , final AttachmentKey < A > key ) { return unit . getAttachment ( key ) ; }
Returns optional attachment value from deployment unit or null if not bound.

@param <A> expected value
@param unit deployment unit
@param key attachment key
@return optional attachment value or null
Returns optional attachment value from deployment unit or null if not bound .