public abstract class RangeConstraint
extends java.lang.Object
Constructor and Description |
---|
RangeConstraint() |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
contains(RangeConstraint other)
Checks whether the given range is compatible with this one.
|
static RangeConstraint |
create(com.android.tools.lint.detector.api.JavaContext context,
org.jetbrains.uast.UAnnotation annotation) |
static RangeConstraint |
create(com.intellij.psi.PsiAnnotation annotation) |
static RangeConstraint |
create(com.intellij.psi.PsiModifierListOwner owner) |
java.lang.String |
describe(org.jetbrains.uast.UExpression argument) |
protected java.lang.Number |
guessSize(org.jetbrains.uast.UExpression argument) |
java.lang.Boolean |
isValid(org.jetbrains.uast.UExpression argument) |
@NonNull public java.lang.String describe(@Nullable org.jetbrains.uast.UExpression argument)
@Nullable public static RangeConstraint create(@NonNull com.intellij.psi.PsiAnnotation annotation)
@Nullable public static RangeConstraint create(@NonNull com.android.tools.lint.detector.api.JavaContext context, @NonNull org.jetbrains.uast.UAnnotation annotation)
@Nullable public static RangeConstraint create(@NonNull com.intellij.psi.PsiModifierListOwner owner)
@Nullable public java.lang.Boolean isValid(@NonNull org.jetbrains.uast.UExpression argument)
@Nullable protected java.lang.Number guessSize(@NonNull org.jetbrains.uast.UExpression argument)
@Nullable public java.lang.Boolean contains(@NonNull RangeConstraint other)
method(x)and the parameter declaration says that x is between 0 and 10, and then we have a parameter which is known to be in the range 5 to 15, here we consider this a compatible range; we don't flag this as an error. If however, the ranges don't overlap, *then* we complain.