Top Description Methods
com.github.javaparser.ast.nodeTypes

public Interface SwitchNode

Known Direct Implementers
com.github.javaparser.ast.stmt.SwitchStmt, com.github.javaparser.ast.expr.SwitchExpr
Imports
com.github.javaparser.ast.Node, .NodeList, com.github.javaparser.ast.comments.Comment, com.github.javaparser.ast.expr.Expression, com.github.javaparser.ast.stmt.SwitchEntry, java.util.Optional

The common interface of com.github.javaparser.ast.expr.SwitchExpr and com.github.javaparser.ast.stmt.SwitchStmt

Method Summary

Modifier and TypeMethod and Description
public SwitchNode
public Optional<Comment>
public NodeList<SwitchEntry>
public SwitchEntry
getEntry(int i)

public Expression
public default boolean

Returns:

true if there are no labels or anything contained in this switch.
isEmpty
()

public boolean
remove(Node node)

public boolean
replace(Node node, Node replacementNode)

public SwitchNode
public SwitchNode

Method Detail

cloneback to summary
public SwitchNode clone()
getCommentback to summary
public Optional<Comment> getComment()
getEntriesback to summary
public NodeList<SwitchEntry> getEntries()
getEntryback to summary
public SwitchEntry getEntry(int i)
getSelectorback to summary
public Expression getSelector()
isEmptyback to summary
public default boolean isEmpty()
Returns:boolean

true if there are no labels or anything contained in this switch.

removeback to summary
public boolean remove(Node node)
replaceback to summary
public boolean replace(Node node, Node replacementNode)
setEntriesback to summary
public SwitchNode setEntries(NodeList<SwitchEntry> entries)
setSelectorback to summary
public SwitchNode setSelector(Expression selector)