Class InternalApiBridge
java.lang.Object
net.sourceforge.pmd.lang.java.ast.InternalApiBridge
Internal API.
Acts as a bridge between outer parts of PMD and the restricted access internal API of this package.
None of this is published API, and compatibility can be broken anytime! Use this only at your own risk.
- Author:
- Clément Fournier
- API Note:
- Internal API
- Since:
- 7.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic JTypeMirrorbuildTypeFromAstInternal(TypeSystem ts, Substitution lexicalSubst, ASTType node) static voiddisambigWithCtx(NodeStream<? extends JavaNode> nodes, net.sourceforge.pmd.lang.java.symbols.table.internal.ReferenceCtx ctx) static voidforceTypeResolutionPhase(net.sourceforge.pmd.lang.java.internal.JavaAstProcessor processor, ASTCompilationUnit root) Forcing type resolution allows us to report errors more cleanly than if it was done completely lazy.static net.sourceforge.pmd.lang.java.types.internal.infer.Inferstatic @NonNull net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolverstatic net.sourceforge.pmd.lang.java.internal.JavaAstProcessorstatic JTypeDeclSymbolgetReferencedSym(ASTClassType type) static @NonNull ExprContextstatic @Nullable JTypeMirrorstatic voidinitTypeResolver(ASTCompilationUnit acu, net.sourceforge.pmd.lang.java.internal.JavaAstProcessor processor, net.sourceforge.pmd.lang.java.types.internal.infer.TypeInferenceLogger logger) static booleanstatic voidoverrideResolution(net.sourceforge.pmd.lang.java.internal.JavaAstProcessor processor, ASTCompilationUnit root) static voidsetCompileTimeDecl(ASTMethodReference methodReference, OverloadSelectionResult methodType) static voidsetFunctionalMethod(FunctionalExpression node, JMethodSig methodType) static voidsetOverload(InvocationNode expression, OverloadSelectionResult result) static voidsetQname(ASTTypeDeclaration declaration, String binaryName, @Nullable String canon) static voidsetSignature(ASTFieldAccess node, JVariableSig.FieldSig sig) static voidsetSignature(ASTVariableAccess node, JVariableSig sig) static voidstatic voidsetSymbol(SymbolDeclaratorNode node, JElementSymbol symbol) static voidsetSymbolTable(JavaNode node, JSymbolTable table) static voidsetTypedSym(ASTFieldAccess expr, JVariableSig.FieldSig sym) static voidsetTypedSym(ASTVariableAccess expr, JVariableSig sym) static voidsetTypeMirrorInternal(TypeNode node, JTypeMirror inferred) static voidusageResolution(net.sourceforge.pmd.lang.java.internal.JavaAstProcessor processor, ASTCompilationUnit root)
-
Method Details
-
setSymbol
-
disambigWithCtx
public static void disambigWithCtx(NodeStream<? extends JavaNode> nodes, net.sourceforge.pmd.lang.java.symbols.table.internal.ReferenceCtx ctx) -
forceTypeResolutionPhase
public static void forceTypeResolutionPhase(net.sourceforge.pmd.lang.java.internal.JavaAstProcessor processor, ASTCompilationUnit root) Forcing type resolution allows us to report errors more cleanly than if it was done completely lazy. Failures (other than semantic exceptions) are thrown, because they are bugs in the typeres framework. Semantic exceptions cause execution to abort too, but only right before rules are applied, so several semantic exceptions may be collected. -
usageResolution
public static void usageResolution(net.sourceforge.pmd.lang.java.internal.JavaAstProcessor processor, ASTCompilationUnit root) -
overrideResolution
public static void overrideResolution(net.sourceforge.pmd.lang.java.internal.JavaAstProcessor processor, ASTCompilationUnit root) -
getTypeMirrorInternal
-
setTypeMirrorInternal
-
setSignature
-
setSignature
-
setFunctionalMethod
-
setCompileTimeDecl
public static void setCompileTimeDecl(ASTMethodReference methodReference, OverloadSelectionResult methodType) -
initTypeResolver
public static void initTypeResolver(ASTCompilationUnit acu, net.sourceforge.pmd.lang.java.internal.JavaAstProcessor processor, net.sourceforge.pmd.lang.java.types.internal.infer.TypeInferenceLogger logger) -
setOverload
-
getProcessor
-
getInferenceEntryPoint
public static net.sourceforge.pmd.lang.java.types.internal.infer.Infer getInferenceEntryPoint(JavaNode n) -
getLazyTypeResolver
public static @NonNull net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver getLazyTypeResolver(JavaNode n) -
getTopLevelExprContext
-
setSymbolTable
-
setQname
public static void setQname(ASTTypeDeclaration declaration, String binaryName, @Nullable String canon) -
assignComments
-
javaTokenDoc
-
setStandaloneTernary
-
isStandaloneInternal
-
buildTypeFromAstInternal
public static JTypeMirror buildTypeFromAstInternal(TypeSystem ts, Substitution lexicalSubst, ASTType node) -
getReferencedSym
-
setTypedSym
-
setTypedSym
-