groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 03/03: Override `toString` methods of lazy nodes
Date Fri, 27 Dec 2019 16:31:43 GMT
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit a75e1c0186be5311daf827093eedd55184abfbbf
Author: Daniel Sun <sunlan@apache.org>
AuthorDate: Sat Dec 28 00:06:16 2019 +0800

    Override `toString` methods of lazy nodes
---
 .../codehaus/groovy/ast/decompiled/LazyConstructorNode.java  | 12 ++++++------
 .../org/codehaus/groovy/ast/decompiled/LazyFieldNode.java    |  6 ++++++
 .../org/codehaus/groovy/ast/decompiled/LazyMethodNode.java   | 12 ++++++------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java
index 311579c..cc9881c 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyConstructorNode.java
@@ -285,12 +285,6 @@ class LazyConstructorNode extends ConstructorNode implements LazyInitializable
{
     }
 
     @Override
-    public String toString() {
-        lazyInit();
-        return delegate.toString();
-    }
-
-    @Override
     public List<AnnotationNode> getAnnotations() {
         lazyInit();
         return delegate.getAnnotations();
@@ -452,6 +446,12 @@ class LazyConstructorNode extends ConstructorNode implements LazyInitializable
{
     }
 
     @Override
+    public String toString() {
+        lazyInit();
+        return delegate.toString();
+    }
+
+    @Override
     public <T> T getNodeMetaData(Object key) {
         lazyInit();
         return delegate.getNodeMetaData(key);
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java
index 286e3a7..49eb7fa 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyFieldNode.java
@@ -401,6 +401,12 @@ class LazyFieldNode extends FieldNode implements LazyInitializable {
     }
 
     @Override
+    public String toString() {
+        lazyInit();
+        return delegate.toString();
+    }
+
+    @Override
     public <T> T getNodeMetaData(Object key) {
         lazyInit();
         return delegate.getNodeMetaData(key);
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java
index c85e3b5..8c25c1b 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/LazyMethodNode.java
@@ -281,12 +281,6 @@ class LazyMethodNode extends MethodNode implements LazyInitializable
{
     }
 
     @Override
-    public String toString() {
-        lazyInit();
-        return delegate.toString();
-    }
-
-    @Override
     public List<AnnotationNode> getAnnotations() {
         lazyInit();
         return delegate.getAnnotations();
@@ -448,6 +442,12 @@ class LazyMethodNode extends MethodNode implements LazyInitializable
{
     }
 
     @Override
+    public String toString() {
+        lazyInit();
+        return delegate.toString();
+    }
+
+    @Override
     public <T> T getNodeMetaData(Object key) {
         lazyInit();
         return delegate.getNodeMetaData(key);


Mime
View raw message