public final class ViolationHelper
extends java.lang.Object
Since an Audit of a large project can literally produce millions of violations, several Violation
implementations need to minimize their memory footprint. This class exists because some of this logic was getting duplicated.
Constructor and Description |
---|
ViolationHelper() |
Modifier and Type | Method and Description |
---|---|
long |
getBits() |
java.lang.Object[] |
getObjects() |
void |
pack(Violation violation, int transformMask) |
static Transform |
unpackDefaultTransform(long bits, Rule rule) |
static Location |
unpackFocusLocation(long bits, java.lang.Object[] objects, Location location) |
static int |
unpackParameterCount(long bits) |
static java.lang.String |
unpackParameterName(long bits, java.lang.Object[] objects, int index) |
static java.lang.Object |
unpackParameterValue(long bits, java.lang.Object[] objects, int index) |
static java.lang.Object |
unpackParameterValue(long bits, java.lang.Object[] objects, java.lang.String name) |
static Suppression |
unpackSuppression(long bits, java.lang.Object[] objects, int index) |
static int |
unpackSuppressionCount(long bits, java.lang.Object[] objects) |
static Transform |
unpackTransform(long bits, Rule rule, int index) |
static int |
unpackTransformCount(long bits) |
static Location |
unpackTransformFocusLocation(long bits, java.lang.Object[] objects, int index) |
static int |
unpackTransformLocationCount(long bits) |
static java.lang.String |
unpackVariation(long bits, Rule rule) |
public void pack(Violation violation, int transformMask)
public long getBits()
public java.lang.Object[] getObjects()
public static Location unpackFocusLocation(long bits, java.lang.Object[] objects, Location location)
public static java.lang.String unpackVariation(long bits, Rule rule)
public static int unpackParameterCount(long bits)
public static java.lang.String unpackParameterName(long bits, java.lang.Object[] objects, int index)
public static java.lang.Object unpackParameterValue(long bits, java.lang.Object[] objects, int index)
public static java.lang.Object unpackParameterValue(long bits, java.lang.Object[] objects, java.lang.String name)
public static int unpackTransformCount(long bits)
public static int unpackTransformLocationCount(long bits)
public static Location unpackTransformFocusLocation(long bits, java.lang.Object[] objects, int index)
public static int unpackSuppressionCount(long bits, java.lang.Object[] objects)
public static Suppression unpackSuppression(long bits, java.lang.Object[] objects, int index)