Package org.sonar.java.ast.parser
Class ListTreeImpl<T extends Tree>
- java.lang.Object
-
- org.sonar.java.model.JavaTree
-
- org.sonar.java.ast.parser.ListTreeImpl<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,ListTree<T>,Tree
- Direct Known Subclasses:
ArgumentListTreeImpl,BlockStatementListTreeImpl,BoundListTreeImpl,FormalParametersListTreeImpl,InitializerListTreeImpl,LambdaParameterListTreeImpl,ModifiersTreeImpl,ModuleNameListTreeImpl,ModuleNameTreeImpl,QualifiedIdentifierListTreeImpl,ResourceListTreeImpl,StatementExpressionListTreeImpl,TypeArgumentListTreeImpl,TypeParameterListTreeImpl,TypeUnionListTreeImpl,VariableDeclaratorListTreeImpl
public abstract class ListTreeImpl<T extends Tree> extends JavaTree implements ListTree<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.sonar.java.model.JavaTree
JavaTree.AnnotatedTypeTree, JavaTree.ArrayTypeTreeImpl, JavaTree.CompilationUnitTreeImpl, JavaTree.ImportTreeImpl, JavaTree.NotImplementedTreeImpl, JavaTree.PackageDeclarationTreeImpl, JavaTree.ParameterizedTypeTreeImpl, JavaTree.PrimitiveTypeTreeImpl, JavaTree.UnionTypeTreeImpl, JavaTree.WildcardTreeImpl
-
-
Field Summary
-
Fields inherited from class org.sonar.java.model.JavaTree
grammarRuleKey
-
-
Constructor Summary
Constructors Constructor Description ListTreeImpl(org.sonar.sslr.grammar.GrammarRuleKey grammarRuleKey, List<T> list)ListTreeImpl(org.sonar.sslr.grammar.GrammarRuleKey grammarRuleKey, List<T> list, List<SyntaxToken> separators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)voidadd(int index, T element)booleanadd(T e)booleanaddAll(int index, Collection<? extends T> c)booleanaddAll(Collection<? extends T> c)Iterable<Tree>children()Creates iterable for children of this node.voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)Tget(int index)intindexOf(Object o)booleanisEmpty()Iterator<T>iterator()Tree.Kindkind()intlastIndexOf(Object o)ListIterator<T>listIterator()ListIterator<T>listIterator(int index)Tremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)List<SyntaxToken>separators()Tset(int index, T element)intsize()List<T>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class org.sonar.java.model.JavaTree
firstToken, getChildren, getGrammarRuleKey, getLine, is, isLeaf, lastToken, parent, setParent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Methods inherited from interface org.sonar.plugins.java.api.tree.Tree
firstToken, is, lastToken, parent
-
-
-
-
Method Detail
-
separators
public List<SyntaxToken> separators()
- Specified by:
separatorsin interfaceListTree<T extends Tree>
-
accept
public void accept(TreeVisitor visitor)
-
children
public Iterable<Tree> children()
Description copied from class:JavaTreeCreates iterable for children of this node. Note that iterable may containnullelements.
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(T e)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T extends Tree>- Specified by:
containsAllin interfaceList<T extends Tree>
-
addAll
public boolean addAll(Collection<? extends T> c)
-
addAll
public boolean addAll(int index, Collection<? extends T> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
clear
public void clear()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<T extends Tree>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<T extends Tree>
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIteratorin interfaceList<T extends Tree>
-
-