static class ConformanceRules.RestrictedMethodCall extends ConformanceRules.AbstractRule
Modifier and Type | Class and Description |
---|---|
private static class |
ConformanceRules.RestrictedMethodCall.Restriction |
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.ImmutableList<ConformanceRules.RestrictedMethodCall.Restriction> |
restrictions |
compiler, message, onlyApplyTo, onlyApplyToRegexp, whitelist, whitelistRegexp
Constructor and Description |
---|
RestrictedMethodCall(AbstractCompiler compiler,
Requirement requirement) |
Modifier and Type | Method and Description |
---|---|
protected ConformanceRules.ConformanceResult |
checkConformance(NodeTraversal t,
Node n) |
private ConformanceRules.ConformanceResult |
checkConformance(NodeTraversal t,
Node n,
ConformanceRules.RestrictedMethodCall.Restriction r,
boolean isCallInvocation) |
private static java.lang.String |
getClassFromDeclarationName(java.lang.String specName)
From a provide name extract the class name.
|
private static java.lang.String |
getPropertyFromDeclarationName(java.lang.String specName)
From a provide name extract the method name.
|
private static java.lang.String |
getTypeFromValue(java.lang.String specName) |
private boolean |
matchesProp(Node n,
ConformanceRules.RestrictedMethodCall.Restriction r) |
private static java.lang.String |
removeTypeDecl(java.lang.String specName) |
check, report, shouldCheckConformance
private final com.google.common.collect.ImmutableList<ConformanceRules.RestrictedMethodCall.Restriction> restrictions
RestrictedMethodCall(AbstractCompiler compiler, Requirement requirement) throws CheckConformance.InvalidRequirementSpec
protected ConformanceRules.ConformanceResult checkConformance(NodeTraversal t, Node n)
checkConformance
in class ConformanceRules.AbstractRule
private boolean matchesProp(Node n, ConformanceRules.RestrictedMethodCall.Restriction r)
private ConformanceRules.ConformanceResult checkConformance(NodeTraversal t, Node n, ConformanceRules.RestrictedMethodCall.Restriction r, boolean isCallInvocation)
private static java.lang.String getPropertyFromDeclarationName(java.lang.String specName) throws CheckConformance.InvalidRequirementSpec
private static java.lang.String getClassFromDeclarationName(java.lang.String specName) throws CheckConformance.InvalidRequirementSpec
private static java.lang.String removeTypeDecl(java.lang.String specName) throws CheckConformance.InvalidRequirementSpec
private static java.lang.String getTypeFromValue(java.lang.String specName)