Package | Description |
---|---|
com.google.javascript.refactoring |
Modifier and Type | Class and Description |
---|---|
class |
JsSourceMatcher
A
Matcher that can take arbitrary JS source code and use it as a
template to find matches in other source code. |
Modifier and Type | Method and Description |
---|---|
static Matcher |
Matchers.allOf(Matcher... matchers)
Returns a Matcher that returns true only if all of the provided
matchers match.
|
static Matcher |
Matchers.anyOf(Matcher... matchers)
Returns a Matcher that returns true if any of the provided matchers match.
|
static Matcher |
Matchers.anything()
Returns a Matcher that matches every node.
|
static Matcher |
Matchers.assignmentWithRhs(Matcher rhsMatcher)
Returns a Matcher that matches an ASSIGN node where the RHS of the assignment matches the given
rhsMatcher.
|
static Matcher |
Matchers.constructor()
Returns a matcher that matches any constructor definitions.
|
static Matcher |
Matchers.constructor(String name)
Returns a matcher that matches constructor definitions of the specified
name.
|
static Matcher |
Matchers.constructorPropertyDeclaration()
Returns a Matcher that matches against properties that are declared in the constructor.
|
static Matcher |
Matchers.enumDefinition()
Returns a Matcher that matches definitions of any enum.
|
static Matcher |
Matchers.enumDefinitionOfType(String type)
Returns a Matcher that matches definitions of an enum of the given type.
|
static Matcher |
Matchers.functionCall()
Returns a Matcher that matches any function call.
|
static Matcher |
Matchers.functionCall(String name)
Returns a Matcher that matches all nodes that are function calls that match
the provided name.
|
static Matcher |
Matchers.functionCallWithNumArgs(int numArgs)
Returns a Matcher that matches any function call that has the given
number of arguments.
|
static Matcher |
Matchers.functionCallWithNumArgs(String name,
int numArgs)
Returns a Matcher that matches any function call that has the given
number of arguments and the given name.
|
static Matcher |
Matchers.isPrivate()
Returns a Matcher that matches against nodes that are declared
@private . |
static Matcher |
Matchers.jsDocType(String type)
Returns a Matcher that matches nodes that contain JS Doc that specify the
@type annotation equivalent to the provided type. |
static Matcher |
Matchers.newClass()
Returns a Matcher that matches constructing new objects.
|
static Matcher |
Matchers.newClass(String className)
Returns a Matcher that matches constructing objects of the provided class
name.
|
static Matcher |
Matchers.not(Matcher matcher)
Returns a Matcher that matches the opposite of the provided matcher.
|
static Matcher |
Matchers.propertyAccess()
Returns a Matcher that matches any property access.
|
static Matcher |
Matchers.propertyAccess(String name)
Returns a Matcher that matches nodes representing a GETPROP access of
an object property.
|
static Matcher |
Matchers.prototypeMethodDeclaration()
Returns a Matcher that matches a declaration of a method on the
prototype of a class.
|
static Matcher |
Matchers.prototypeVariableDeclaration()
Returns a Matcher that matches a declaration of a variable on the
prototype of a class.
|
Modifier and Type | Method and Description |
---|---|
static Matcher |
Matchers.allOf(Matcher... matchers)
Returns a Matcher that returns true only if all of the provided
matchers match.
|
static Matcher |
Matchers.anyOf(Matcher... matchers)
Returns a Matcher that returns true if any of the provided matchers match.
|
static Matcher |
Matchers.assignmentWithRhs(Matcher rhsMatcher)
Returns a Matcher that matches an ASSIGN node where the RHS of the assignment matches the given
rhsMatcher.
|
static Matcher |
Matchers.not(Matcher matcher)
Returns a Matcher that matches the opposite of the provided matcher.
|
Copyright © 2009-2016 Google. All Rights Reserved.