Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ated static method
- Loading branch information
Michail Plushnikov
committed
Mar 9, 2015
1 parent
e061975
commit 9db788c
Showing
10 changed files
with
167 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
lombok-plugin/src/test/data/after/BuilderConstructorException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
class Exception { | ||
} | ||
public class BuilderConstructorException { | ||
|
||
private int i; | ||
|
||
public BuilderConstructorException(int i) throws Exception { | ||
System.out.println("sss"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
try { | ||
builder().i(2).build(); | ||
} catch (Exception ignore) { | ||
} | ||
} | ||
|
||
public static BuilderConstructorExceptionBuilder builder() { | ||
return new BuilderConstructorExceptionBuilder(); | ||
} | ||
|
||
public static class BuilderConstructorExceptionBuilder { | ||
private int i; | ||
|
||
BuilderConstructorExceptionBuilder() { | ||
} | ||
|
||
public BuilderConstructorExceptionBuilder i(int i) { | ||
this.i = i; | ||
return this; | ||
} | ||
|
||
public BuilderConstructorException build() throws Exception { | ||
return new BuilderConstructorException(i); | ||
} | ||
|
||
public String toString() { | ||
return "BuilderConstructorException.BuilderConstructorExceptionBuilder(i=" + this.i + ")"; | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
lombok-plugin/src/test/data/after/BuilderMethodException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
class Exception { | ||
} | ||
|
||
public class BuilderMethodException { | ||
|
||
private static void foo(int i) throws Exception { | ||
System.out.println("sss"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
try { | ||
builder().i(2).build(); | ||
} catch (Exception ignore) { | ||
} | ||
} | ||
|
||
public static VoidBuilder builder() { | ||
return new VoidBuilder(); | ||
} | ||
|
||
public static class VoidBuilder { | ||
private int i; | ||
|
||
VoidBuilder() { | ||
} | ||
|
||
public VoidBuilder i(int i) { | ||
this.i = i; | ||
return this; | ||
} | ||
|
||
public void build() throws Exception { | ||
foo(i); | ||
} | ||
|
||
public String toString() { | ||
return "BuilderMethodException.VoidBuilder(i=" + this.i + ")"; | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
lombok-plugin/src/test/data/before/BuilderConstructorException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class Exception { | ||
} | ||
|
||
@lombok.Builder | ||
public class BuilderConstructorException { | ||
|
||
private int i; | ||
|
||
public BuilderConstructorException(int i) throws Exception { | ||
System.out.println("sss"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
try { | ||
builder().i(2).build(); | ||
} catch (Exception ignore) { | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
lombok-plugin/src/test/data/before/BuilderMethodException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class Exception { | ||
} | ||
|
||
public class BuilderMethodException { | ||
@lombok.Builder | ||
private static void foo(int i) throws Exception { | ||
System.out.println("sss"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
try { | ||
builder().i(2).build(); | ||
} catch (Exception ignore) { | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
test-manual/lombok/src/main/java/de/plushnikov/builder/BuilderConstructorException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package de.plushnikov.builder; | ||
|
||
@lombok.Builder | ||
public class BuilderConstructorException { | ||
|
||
private int i; | ||
|
||
public BuilderConstructorException(int i) throws Exception { | ||
System.out.println("sss"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
try { | ||
builder().i(2).build(); | ||
} catch (Exception ignore) { | ||
} | ||
} | ||
} |
8 changes: 3 additions & 5 deletions
8
...plushnikov/builder/BuilderExceptions.java → ...nikov/builder/BuilderMethodException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
package de.plushnikov.builder; | ||
|
||
import lombok.Builder; | ||
|
||
public class BuilderExceptions { | ||
@Builder | ||
public class BuilderMethodException { | ||
@lombok.Builder | ||
private static void foo(int i) throws Exception { | ||
System.out.println("sss"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
try { | ||
builder().i(2).build(); | ||
} catch (Exception e) { | ||
} catch (Exception ignore) { | ||
} | ||
} | ||
} |