Constructor and Description |
---|
CodeBodyImpl(AbstractParserBuilder builder) |
Modifier and Type | Method and Description |
---|---|
void |
_return(com.sun.codemodel.JType type,
com.sun.codemodel.JExpression ex)
When the match completes, return the given expression (of the given type)
to the parent
ParserBuilder . |
void |
_return(com.sun.codemodel.JVar var)
Short-cut for
_return(var.type(),var) so that returning
a variable is easier. |
void |
add(com.sun.codemodel.JStatement stmt)
Short-cut for
getBlock().add(...) . |
com.sun.codemodel.JVar |
decl(com.sun.codemodel.JType jc,
String name,
com.sun.codemodel.JExpression expr) |
com.sun.codemodel.JVar |
field(int flags,
com.sun.codemodel.JType jc,
String name,
com.sun.codemodel.JExpression expr) |
com.sun.codemodel.JBlock |
getBlock()
Gets the code block that will be executed when the attribute/element
matches.
|
public CodeBodyImpl(AbstractParserBuilder builder)
public void add(com.sun.codemodel.JStatement stmt)
CodeBody
getBlock().add(...)
.public com.sun.codemodel.JVar field(int flags, com.sun.codemodel.JType jc, String name, com.sun.codemodel.JExpression expr)
public com.sun.codemodel.JVar decl(com.sun.codemodel.JType jc, String name, com.sun.codemodel.JExpression expr)
public void _return(com.sun.codemodel.JVar var)
CodeBody
_return(var.type(),var)
so that returning
a variable is easier.public void _return(com.sun.codemodel.JType type, com.sun.codemodel.JExpression ex)
CodeBody
ParserBuilder
.Copyright © 2007–2017. All rights reserved.