Example usage for org.apache.commons.collections ListUtils EMPTY_LIST

List of usage examples for org.apache.commons.collections ListUtils EMPTY_LIST

Introduction

In this page you can find the example usage for org.apache.commons.collections ListUtils EMPTY_LIST.

Prototype

List EMPTY_LIST

To view the source code for org.apache.commons.collections ListUtils EMPTY_LIST.

Click Source Link

Document

An empty unmodifiable list.

Usage

From source file:org.sonar.javascript.model.implementations.expression.ObjectLiteralTreeImpl.java

public ObjectLiteralTreeImpl(InternalSyntaxToken openCurlyBrace, InternalSyntaxToken closeCurlyBrace) {
    super(Kind.OBJECT_LITERAL);
    this.openCurlyBrace = openCurlyBrace;
    this.closeCurlyBrace = closeCurlyBrace;
    this.properties = new SeparatedList<Tree>(ListUtils.EMPTY_LIST, ListUtils.EMPTY_LIST);

    addChildren(openCurlyBrace, closeCurlyBrace);
}

From source file:org.sonar.javascript.model.implementations.expression.TemplateLiteralTreeImpl.java

public TemplateLiteralTreeImpl(InternalSyntaxToken openBacktick, List<TemplateCharactersTree> strings,
        InternalSyntaxToken closeBacktick) {

    super(Kind.TEMPLATE_LITERAL);
    this.openBacktick = openBacktick;
    this.strings = strings;
    this.expressions = ListUtils.EMPTY_LIST;
    this.closeBacktick = closeBacktick;

    addChild(openBacktick);/* w w w.  j a  va  2s  .  c o m*/
    addChildren(strings.toArray(new AstNode[strings.size()]));
    addChild(closeBacktick);
}

From source file:org.sonar.javascript.model.implementations.SeparatedList.java

public void clearChildren() {
    children = ListUtils.EMPTY_LIST;
}

From source file:org.sonar.javascript.model.implementations.statement.BlockTreeImpl.java

public BlockTreeImpl(InternalSyntaxToken openCurlyBrace, InternalSyntaxToken closeCurlyBrace) {
    super(Kind.BLOCK);
    this.openCurlyBrace = openCurlyBrace;
    this.statements = ListUtils.EMPTY_LIST;
    this.closeCurlyBrace = closeCurlyBrace;

    addChild(openCurlyBrace);/*from   w  w  w.ja  v  a 2 s.c o m*/
    addChild(closeCurlyBrace);
}

From source file:org.sonar.javascript.model.implementations.statement.CaseClauseTreeImpl.java

public CaseClauseTreeImpl(InternalSyntaxToken caseKeyword, ExpressionTree expression,
        InternalSyntaxToken colon) {//from   w  ww  . j a  v  a2s  . c  o  m
    super(Kind.CASE_CLAUSE);
    this.caseKeyword = caseKeyword;
    this.expression = expression;
    this.colon = colon;
    this.statements = ListUtils.EMPTY_LIST;

    addChildren(caseKeyword, (AstNode) expression, colon);
}

From source file:org.sonar.javascript.model.implementations.statement.DefaultClauseTreeImpl.java

public DefaultClauseTreeImpl(InternalSyntaxToken defaultKeyword, InternalSyntaxToken colon) {
    super(Kind.DEFAULT_CLAUSE);
    this.defaultKeyword = defaultKeyword;
    this.colon = colon;
    this.statements = ListUtils.EMPTY_LIST;

    addChildren(defaultKeyword, colon);/*w w w .  j  av  a 2  s .  c  o  m*/
}

From source file:org.sonar.javascript.parser.TreeFactory.java

public ParameterListTreeImpl formalParameterClause3(InternalSyntaxToken lParenthesis,
        Optional<RestElementTreeImpl> restElementTree, InternalSyntaxToken rParenthesis) {
    SeparatedList<Tree> parameters = new SeparatedList<>(new ArrayList<Tree>(), ListUtils.EMPTY_LIST);
    if (restElementTree.isPresent()) {
        parameters.add(restElementTree.get());
    }/*from  w ww  .j  a v  a 2 s. c o m*/
    return new ParameterListTreeImpl(Kind.FORMAL_PARAMETER_LIST, lParenthesis, parameters, rParenthesis);
}

From source file:org.sonar.javascript.parser.TreeFactory.java

public ParameterListTreeImpl argumentClause(InternalSyntaxToken openParenToken,
        Optional<SeparatedList<Tree>> arguments, InternalSyntaxToken closeParenToken) {
    return new ParameterListTreeImpl(Kind.ARGUMENTS, openParenToken, arguments.isPresent() ? arguments.get()
            : new SeparatedList<Tree>(ListUtils.EMPTY_LIST, ListUtils.EMPTY_LIST), closeParenToken);
}

From source file:org.sonar.javascript.parser.TreeFactory.java

public TemplateLiteralTree noSubstitutionTemplate(InternalSyntaxToken openBacktickToken,
        Optional<TemplateCharactersTree> templateCharacters, InternalSyntaxToken closeBacktickToken) {
    return new TemplateLiteralTreeImpl(openBacktickToken,
            templateCharacters.isPresent() ? Lists.newArrayList(templateCharacters.get())
                    : ListUtils.EMPTY_LIST,
            closeBacktickToken);//  w  ww  .j a va  2s .c o  m
}

From source file:org.sonar.javascript.tree.impl.declaration.ObjectBindingPatternTreeImpl.java

public ObjectBindingPatternTreeImpl(InternalSyntaxToken openCurlyBrace, InternalSyntaxToken closeCurlyBrace) {
    this.openCurlyBrace = openCurlyBrace;
    this.bindingElements = new SeparatedList<>(ListUtils.EMPTY_LIST, ListUtils.EMPTY_LIST);
    this.closeCurlyBrace = closeCurlyBrace;

}