public class LambdaToMethod extends TreeTranslator
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Field and Description |
---|---|
static int |
FLAG_BRIDGES
Flag for alternate metafactories indicating the lambda object requires multiple bridges
|
static int |
FLAG_MARKERS
Flag for alternate metafactories indicating the lambda object has multiple targets
|
static int |
FLAG_SERIALIZABLE
Flag for alternate metafactories indicating the lambda object is intended to be serializable
|
protected static Context.Key<LambdaToMethod> |
unlambdaKey |
result
Modifier and Type | Method and Description |
---|---|
static LambdaToMethod |
instance(Context context) |
<T extends JCTree> |
translate(T tree)
Visitor method: Translate a single node.
|
JCTree |
translateTopLevelClass(Env<AttrContext> env,
JCTree cdef,
TreeMaker make) |
void |
visitClassDef(JCTree.JCClassDecl tree)
Visit a class.
|
void |
visitIdent(JCTree.JCIdent tree)
Translate identifiers within a lambda to the mapped identifier
|
void |
visitLambda(JCTree.JCLambda tree)
Translate a lambda into a method to be inserted into the class.
|
void |
visitReference(JCTree.JCMemberReference tree)
Translate a method reference into an invokedynamic call to the
meta-factory.
|
void |
visitVarDef(JCTree.JCVariableDecl tree) |
translate, translateAnnotations, translateCases, translateCatchers, translateTypeParams, translateVarDefs, visitAnnotatedType, visitAnnotation, visitApply, visitAssert, visitAssign, visitAssignop, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitConditional, visitContinue, visitDoLoop, visitErroneous, visitExec, visitForeachLoop, visitForLoop, visitIf, visitImport, visitIndexed, visitLabelled, visitLetExpr, visitLiteral, visitMethodDef, visitModifiers, visitNewArray, visitNewClass, visitParens, visitReturn, visitSelect, visitSkip, visitSwitch, visitSynchronized, visitThrow, visitTopLevel, visitTree, visitTry, visitTypeApply, visitTypeArray, visitTypeBoundKind, visitTypeCast, visitTypeIdent, visitTypeIntersection, visitTypeParameter, visitTypeTest, visitTypeUnion, visitUnary, visitWhileLoop, visitWildcard
public static final int FLAG_SERIALIZABLE
public static final int FLAG_MARKERS
public static final int FLAG_BRIDGES
protected static final Context.Key<LambdaToMethod> unlambdaKey
public static LambdaToMethod instance(Context context)
public <T extends JCTree> T translate(T tree)
TreeTranslator
translate
in class TreeTranslator
public JCTree translateTopLevelClass(Env<AttrContext> env, JCTree cdef, TreeMaker make)
public void visitClassDef(JCTree.JCClassDecl tree)
visitClassDef
in class TreeTranslator
tree
- public void visitLambda(JCTree.JCLambda tree)
visitLambda
in class TreeTranslator
tree
- public void visitReference(JCTree.JCMemberReference tree)
visitReference
in class TreeTranslator
tree
- public void visitIdent(JCTree.JCIdent tree)
visitIdent
in class TreeTranslator
tree
- public void visitVarDef(JCTree.JCVariableDecl tree)
visitVarDef
in class TreeTranslator
Copyright © 2015. All rights reserved.