Java Code Examples for com.sun.tools.javac.tree.TreeMaker#Select
The following examples show how to use
com.sun.tools.javac.tree.TreeMaker#Select .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExtensionTransformer.java From manifold with Apache License 2.0 | 5 votes |
private JCExpression memberAccess( TreeMaker make, JavacElements node, String... components ) { JCExpression expr = make.Ident( node.getName( components[0] ) ); for( int i = 1; i < components.length; i++ ) { expr = make.Select( expr, node.getName( components[i] ) ); } return expr; }
Example 2
Source File: BootstrapInserter.java From manifold with Apache License 2.0 | 5 votes |
private JCTree.JCExpression memberAccess( TreeMaker make, JavacElements node, String... components ) { JCTree.JCExpression expr = make.Ident( node.getName( components[0] ) ); for( int i = 1; i < components.length; i++ ) { expr = make.Select( expr, node.getName( components[i] ) ); } return expr; }
Example 3
Source File: TypeEnter.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 3 votes |
/** Generate call to superclass constructor. This is: * * super(id_0, ..., id_n) * * or, if based == true * * id_0.super(id_1,...,id_n) * * where id_0, ..., id_n are the names of the given parameters. * * @param make The tree factory * @param params The parameters that need to be passed to super * @param typarams The type parameters that need to be passed to super * @param based Is first parameter a this$n? */ JCExpressionStatement SuperCall(TreeMaker make, List<Type> typarams, List<JCVariableDecl> params, boolean based) { JCExpression meth; if (based) { meth = make.Select(make.Ident(params.head), names._super); params = params.tail; } else { meth = make.Ident(names._super); } List<JCExpression> typeargs = typarams.nonEmpty() ? make.Types(typarams) : null; return make.Exec(make.Apply(typeargs, meth, make.Idents(params))); }