public class VerifyUsageWithEquals extends VerifyPhase<PhaseContext>
AssertionError
.
Note that only TrustedInterface
s can be verified.VerifyPhase.VerificationError
Modifier and Type | Field and Description |
---|---|
private Class<?> |
restrictedClass
The type of values that must not use identity for testing object equality.
|
BEFORE_PHASE_DUMP_LEVEL, PHASE_DUMP_LEVEL
Constructor and Description |
---|
VerifyUsageWithEquals(Class<?> restrictedClass) |
Modifier and Type | Method and Description |
---|---|
private boolean |
isAssignableToRestrictedType(ValueNode node,
MetaAccessProvider metaAccess)
Determines whether the type of
node is assignable to the restrictedClass . |
private static boolean |
isEqualsMethod(ResolvedJavaMethod method) |
private boolean |
isIllegalUsage(ResolvedJavaMethod method,
ValueNode x,
ValueNode y,
MetaAccessProvider metaAccess)
Checks whether the type of
x is assignable to the restricted type and that y
is not a null constant. |
private static boolean |
isNullConstant(ValueNode node) |
private static boolean |
isThisParameter(ValueNode node) |
protected boolean |
verify(StructuredGraph graph,
PhaseContext context)
Performs the actual verification.
|
run
apply, apply, createName, getName
private final Class<?> restrictedClass
public VerifyUsageWithEquals(Class<?> restrictedClass)
private boolean isAssignableToRestrictedType(ValueNode node, MetaAccessProvider metaAccess)
node
is assignable to the restrictedClass
.private static boolean isNullConstant(ValueNode node)
private static boolean isEqualsMethod(ResolvedJavaMethod method)
private static boolean isThisParameter(ValueNode node)
private boolean isIllegalUsage(ResolvedJavaMethod method, ValueNode x, ValueNode y, MetaAccessProvider metaAccess)
x
is assignable to the restricted type and that y
is not a null constant.protected boolean verify(StructuredGraph graph, PhaseContext context)
VerifyPhase
verify
in class VerifyPhase<PhaseContext>