Java Code Examples for org.mozilla.javascript.Token#GET

The following examples show how to use org.mozilla.javascript.Token#GET . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ObjectProperty.java    From JsDroidCmd with Mozilla Public License 2.0 5 votes vote down vote up
/**
 * Sets the node type.  Must be one of
 * {@link Token#COLON}, {@link Token#GET}, or {@link Token#SET}.
 * @throws IllegalArgumentException if {@code nodeType} is invalid
 */
public void setNodeType(int nodeType) {
    if (nodeType != Token.COLON
        && nodeType != Token.GET
        && nodeType != Token.SET
        && nodeType != Token.METHOD)
        throw new IllegalArgumentException("invalid node type: "
                                           + nodeType);
    setType(nodeType);
}
 
Example 2
Source File: ObjectProperty.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the node type.  Must be one of
 * {@link Token#COLON}, {@link Token#GET}, or {@link Token#SET}.
 * @throws IllegalArgumentException if {@code nodeType} is invalid
 */
public void setNodeType(int nodeType) {
    if (nodeType != Token.COLON
        && nodeType != Token.GET
        && nodeType != Token.SET)
        throw new IllegalArgumentException("invalid node type: "
                                           + nodeType);
    setType(nodeType);
}
 
Example 3
Source File: ObjectProperty.java    From JsDroidCmd with Mozilla Public License 2.0 4 votes vote down vote up
/**
 * Marks this node as a "getter" property.
 */
public void setIsGetterMethod() {
    type = Token.GET;
}
 
Example 4
Source File: ObjectProperty.java    From JsDroidCmd with Mozilla Public License 2.0 4 votes vote down vote up
/**
 * Returns true if this is a getter function.
 */
public boolean isGetterMethod() {
    return type == Token.GET;
}
 
Example 5
Source File: ObjectProperty.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Marks this node as a "getter" property.
 */
public void setIsGetter() {
    type = Token.GET;
}
 
Example 6
Source File: ObjectProperty.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns true if this is a getter function.
 */
public boolean isGetter() {
    return type == Token.GET;
}