webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ASHelper.java
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);
    }
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 .