public class ExtensionTransformer
extends com.sun.tools.javac.tree.TreeTranslator
| Constructor and Description |
|---|
ExtensionTransformer(ExtensionManifold sp,
TypeProcessor typeProcessor) |
| Modifier and Type | Method and Description |
|---|---|
void |
genUnary(com.sun.tools.javac.tree.JCTree.JCUnary tree,
com.sun.tools.javac.tree.TreeMaker make,
com.sun.tools.javac.code.Symbol.MethodSymbol operatorMethod) |
com.sun.tools.javac.tree.JCTree.JCClassDecl |
getEnclosingClass(com.sun.source.tree.Tree tree) |
static com.sun.tools.javac.tree.JCTree.JCClassDecl |
getEnclosingClass(com.sun.source.tree.Tree tree,
java.util.function.Function<com.sun.source.tree.Tree,com.sun.source.tree.Tree> parentOf) |
static com.sun.tools.javac.code.Symbol |
getEnclosingSymbol(com.sun.source.tree.Tree tree,
com.sun.tools.javac.util.Context ctx,
java.util.function.Function<com.sun.source.tree.Tree,com.sun.source.tree.Tree> parentOf) |
TypeProcessor |
getTypeProcessor() |
static boolean |
isJailbreakReceiver(com.sun.tools.javac.tree.JCTree.JCFieldAccess fieldAccess) |
static boolean |
isJailbreakReceiver(com.sun.tools.javac.tree.JCTree tree) |
static boolean |
isJailbreakSymbol(com.sun.tools.javac.code.Symbol sym) |
com.sun.tools.javac.tree.JCTree.JCMethodInvocation |
maybeReplaceWithExtensionMethod(com.sun.tools.javac.tree.JCTree.JCMethodInvocation methodCall) |
com.sun.tools.javac.tree.JCTree.JCMethodInvocation |
maybeReplaceWithStructuralCall(com.sun.tools.javac.tree.JCTree.JCMethodInvocation methodCall) |
static com.sun.tools.javac.code.Symbol.MethodSymbol |
resolveMethod(com.sun.tools.javac.util.Context context,
com.sun.source.tree.CompilationUnitTree compUnit,
com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition pos,
com.sun.tools.javac.util.Name name,
com.sun.tools.javac.code.Type qual,
com.sun.tools.javac.util.List<com.sun.tools.javac.code.Type> args) |
com.sun.tools.javac.code.Symbol.MethodSymbol |
resolveMethod(com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition pos,
com.sun.tools.javac.util.Name name,
com.sun.tools.javac.code.Type qual,
com.sun.tools.javac.util.List<com.sun.tools.javac.code.Type> args) |
static com.sun.tools.javac.tree.JCTree[] |
tempify(boolean force,
com.sun.tools.javac.tree.JCTree.JCExpression tree,
com.sun.tools.javac.tree.TreeMaker make,
com.sun.tools.javac.tree.JCTree.JCExpression expr,
com.sun.tools.javac.util.Context ctx,
com.sun.tools.javac.code.Symbol owner,
java.lang.String varName,
int tempVarIndex) |
static com.sun.tools.javac.tree.JCTree.JCExpression |
unbox(com.sun.tools.javac.code.Types types,
com.sun.tools.javac.tree.TreeMaker make,
com.sun.tools.javac.util.Names names,
com.sun.tools.javac.util.Context context,
com.sun.source.tree.CompilationUnitTree compUnit,
com.sun.tools.javac.tree.JCTree.JCExpression tree,
com.sun.tools.javac.code.Type primitive)
Unbox an object to a primitive value.
|
void |
visitAnnotation(com.sun.tools.javac.tree.JCTree.JCAnnotation tree) |
void |
visitApply(com.sun.tools.javac.tree.JCTree.JCMethodInvocation tree)
Replace all extension method call-sites with static calls to extension methods
|
void |
visitAssign(com.sun.tools.javac.tree.JCTree.JCAssign tree) |
void |
visitAssignop(com.sun.tools.javac.tree.JCTree.JCAssignOp tree) |
void |
visitBinary(com.sun.tools.javac.tree.JCTree.JCBinary tree) |
void |
visitClassDef(com.sun.tools.javac.tree.JCTree.JCClassDecl tree) |
void |
visitConditional(com.sun.tools.javac.tree.JCTree.JCConditional tree) |
void |
visitForeachLoop(com.sun.tools.javac.tree.JCTree.JCEnhancedForLoop tree) |
void |
visitIdent(com.sun.tools.javac.tree.JCTree.JCIdent tree)
Erase all structural interface type literals to Object
|
void |
visitIndexed(com.sun.tools.javac.tree.JCTree.JCArrayAccess tree) |
void |
visitLambda(com.sun.tools.javac.tree.JCTree.JCLambda tree) |
void |
visitLiteral(com.sun.tools.javac.tree.JCTree.JCLiteral tree) |
void |
visitMethodDef(com.sun.tools.javac.tree.JCTree.JCMethodDecl tree)
Issue errors/warnings if an extension method violates extension method grammar or conflicts with an existing method
|
void |
visitNewClass(com.sun.tools.javac.tree.JCTree.JCNewClass tree) |
void |
visitReference(com.sun.tools.javac.tree.JCTree.JCMemberReference tree) |
void |
visitSelect(com.sun.tools.javac.tree.JCTree.JCFieldAccess tree)
Erase all structural interface type literals to Object
|
void |
visitTypeCast(com.sun.tools.javac.tree.JCTree.JCTypeCast tree) |
void |
visitUnary(com.sun.tools.javac.tree.JCTree.JCUnary tree) |
void |
visitVarDef(com.sun.tools.javac.tree.JCTree.JCVariableDecl tree) |
translate, translate, translateAnnotations, translateCases, translateCatchers, translateTypeParams, translateVarDefs, visitAnnotatedType, visitAssert, visitBlock, visitBreak, visitCase, visitCatch, visitContinue, visitDoLoop, visitErroneous, visitExec, visitForLoop, visitIf, visitImport, visitLabelled, visitLetExpr, visitModifiers, visitNewArray, visitParens, visitReturn, visitSkip, visitSwitch, visitSynchronized, visitThrow, visitTopLevel, visitTree, visitTry, visitTypeApply, visitTypeArray, visitTypeBoundKind, visitTypeIdent, visitTypeIntersection, visitTypeParameter, visitTypeTest, visitTypeUnion, visitWhileLoop, visitWildcardpublic ExtensionTransformer(ExtensionManifold sp, TypeProcessor typeProcessor)
public TypeProcessor getTypeProcessor()
public void visitIndexed(com.sun.tools.javac.tree.JCTree.JCArrayAccess tree)
visitIndexed in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitBinary(com.sun.tools.javac.tree.JCTree.JCBinary tree)
visitBinary in class com.sun.tools.javac.tree.TreeTranslatorpublic static com.sun.tools.javac.tree.JCTree[] tempify(boolean force,
com.sun.tools.javac.tree.JCTree.JCExpression tree,
com.sun.tools.javac.tree.TreeMaker make,
com.sun.tools.javac.tree.JCTree.JCExpression expr,
com.sun.tools.javac.util.Context ctx,
com.sun.tools.javac.code.Symbol owner,
java.lang.String varName,
int tempVarIndex)
public static com.sun.tools.javac.tree.JCTree.JCExpression unbox(com.sun.tools.javac.code.Types types,
com.sun.tools.javac.tree.TreeMaker make,
com.sun.tools.javac.util.Names names,
com.sun.tools.javac.util.Context context,
com.sun.source.tree.CompilationUnitTree compUnit,
com.sun.tools.javac.tree.JCTree.JCExpression tree,
com.sun.tools.javac.code.Type primitive)
public void visitIdent(com.sun.tools.javac.tree.JCTree.JCIdent tree)
visitIdent in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitLambda(com.sun.tools.javac.tree.JCTree.JCLambda tree)
visitLambda in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitSelect(com.sun.tools.javac.tree.JCTree.JCFieldAccess tree)
visitSelect in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitAssign(com.sun.tools.javac.tree.JCTree.JCAssign tree)
visitAssign in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitAssignop(com.sun.tools.javac.tree.JCTree.JCAssignOp tree)
visitAssignop in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitUnary(com.sun.tools.javac.tree.JCTree.JCUnary tree)
visitUnary in class com.sun.tools.javac.tree.TreeTranslatorpublic com.sun.tools.javac.tree.JCTree.JCMethodInvocation maybeReplaceWithExtensionMethod(com.sun.tools.javac.tree.JCTree.JCMethodInvocation methodCall)
public com.sun.tools.javac.tree.JCTree.JCMethodInvocation maybeReplaceWithStructuralCall(com.sun.tools.javac.tree.JCTree.JCMethodInvocation methodCall)
public void genUnary(com.sun.tools.javac.tree.JCTree.JCUnary tree,
com.sun.tools.javac.tree.TreeMaker make,
com.sun.tools.javac.code.Symbol.MethodSymbol operatorMethod)
public void visitNewClass(com.sun.tools.javac.tree.JCTree.JCNewClass tree)
visitNewClass in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitConditional(com.sun.tools.javac.tree.JCTree.JCConditional tree)
visitConditional in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitVarDef(com.sun.tools.javac.tree.JCTree.JCVariableDecl tree)
visitVarDef in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitTypeCast(com.sun.tools.javac.tree.JCTree.JCTypeCast tree)
visitTypeCast in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitLiteral(com.sun.tools.javac.tree.JCTree.JCLiteral tree)
visitLiteral in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitApply(com.sun.tools.javac.tree.JCTree.JCMethodInvocation tree)
visitApply in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitReference(com.sun.tools.javac.tree.JCTree.JCMemberReference tree)
visitReference in class com.sun.tools.javac.tree.TreeTranslatorpublic static boolean isJailbreakReceiver(com.sun.tools.javac.tree.JCTree tree)
public static boolean isJailbreakReceiver(com.sun.tools.javac.tree.JCTree.JCFieldAccess fieldAccess)
public static boolean isJailbreakSymbol(com.sun.tools.javac.code.Symbol sym)
public void visitForeachLoop(com.sun.tools.javac.tree.JCTree.JCEnhancedForLoop tree)
visitForeachLoop in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitAnnotation(com.sun.tools.javac.tree.JCTree.JCAnnotation tree)
visitAnnotation in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitClassDef(com.sun.tools.javac.tree.JCTree.JCClassDecl tree)
visitClassDef in class com.sun.tools.javac.tree.TreeTranslatorpublic void visitMethodDef(com.sun.tools.javac.tree.JCTree.JCMethodDecl tree)
visitMethodDef in class com.sun.tools.javac.tree.TreeTranslatorpublic com.sun.tools.javac.tree.JCTree.JCClassDecl getEnclosingClass(com.sun.source.tree.Tree tree)
public static com.sun.tools.javac.tree.JCTree.JCClassDecl getEnclosingClass(com.sun.source.tree.Tree tree,
java.util.function.Function<com.sun.source.tree.Tree,com.sun.source.tree.Tree> parentOf)
public static com.sun.tools.javac.code.Symbol getEnclosingSymbol(com.sun.source.tree.Tree tree,
com.sun.tools.javac.util.Context ctx,
java.util.function.Function<com.sun.source.tree.Tree,com.sun.source.tree.Tree> parentOf)
public com.sun.tools.javac.code.Symbol.MethodSymbol resolveMethod(com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition pos,
com.sun.tools.javac.util.Name name,
com.sun.tools.javac.code.Type qual,
com.sun.tools.javac.util.List<com.sun.tools.javac.code.Type> args)
public static com.sun.tools.javac.code.Symbol.MethodSymbol resolveMethod(com.sun.tools.javac.util.Context context,
com.sun.source.tree.CompilationUnitTree compUnit,
com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition pos,
com.sun.tools.javac.util.Name name,
com.sun.tools.javac.code.Type qual,
com.sun.tools.javac.util.List<com.sun.tools.javac.code.Type> args)
Copyright © 2024. All rights reserved.