public class ExtensionMethodNode
extends MethodNode
Represents method nodes which are used by the static type checker to virtually add methods coming from DGM-like methods.
| Constructor and description |
|---|
ExtensionMethodNode(MethodNode extensionMethodNode, String name, int modifiers, ClassNode returnType, Parameter[] parameters, ClassNode[] exceptions, Statement code, boolean isStaticExtension)Builds a synthetic method the type checker can select in place of extensionMethodNode. |
ExtensionMethodNode(MethodNode extensionMethodNode, String name, int modifiers, ClassNode returnType, Parameter[] parameters, ClassNode[] exceptions, Statement code)Builds a non-static extension node by passing false as the static-extension flag to the other constructor. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public MethodNode |
getExtensionMethodNode()Returns the original extension method represented by this synthetic node. |
|
public boolean |
isStaticExtension()Indicates whether this node models a static extension method. |
Builds a synthetic method the type checker can select in place of
extensionMethodNode. The declaration passed here is what
callers see; getExtensionMethodNode keeps the original.
extensionMethodNode - original extension methodname - name presented to the type checkermodifiers - access flags of the synthetic methodreturnType - return type presented to the type checkerparameters - parameters presented to the type checkerexceptions - exceptions presented to the type checkercode - method body forwarded to MethodNodeisStaticExtension - true when the original method is a
static extensionBuilds a non-static extension node by passing false as the static-extension flag to the other constructor.
extensionMethodNode - original extension methodname - name presented to the type checkermodifiers - access flags of the synthetic methodreturnType - return type presented to the type checkerparameters - parameters presented to the type checkerexceptions - exceptions presented to the type checkercode - method body forwarded to MethodNodeReturns the original extension method represented by this synthetic node.
Indicates whether this node models a static extension method.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.