public interface CodeBody
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.
|
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)
void add(com.sun.codemodel.JStatement stmt)
getBlock().add(...)
.com.sun.codemodel.JBlock getBlock()
void _return(com.sun.codemodel.JType type, com.sun.codemodel.JExpression ex)
ParserBuilder
.void _return(com.sun.codemodel.JVar var)
_return(var.type(),var)
so that returning
a variable is easier.Copyright © 2007–2015. All rights reserved.