weld/subsystem/src/main/java/org/jboss/as/weld/_private/WeldDeploymentMarker.java
public static boolean isPartOfWeldDeployment(DeploymentUnit unit) {
        if (unit.getParent() == null) {
            return unit.getAttachment(MARKER) != null;
        } else {
            return unit.getParent().getAttachment(MARKER) != null;
        }
    }
public static boolean isPartOfWeldDeployment(DeploymentUnit unit) {
        if (unit.getParent() == null) {
            return unit.getAttachment(MARKER) != null;
        } else {
            return unit.getParent().getAttachment(MARKER) != null;
        }
    }
returns true if the {@link DeploymentUnit} is part of a weld deployment