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
Issue # 175
- Loading branch information
Michail Plushnikov
committed
Jan 23, 2016
1 parent
8ca809b
commit ef5fbc0
Showing
12 changed files
with
169 additions
and
53 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import java.util.regex.Pattern; | ||
class Tolerate { | ||
private Pattern pattern; | ||
public @lombok.experimental.Tolerate void setPattern(String pattern) { | ||
setPattern(Pattern.compile(pattern)); | ||
} | ||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPattern(final Pattern pattern) { | ||
this.pattern = pattern; | ||
} | ||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Pattern getPattern() { | ||
return this.pattern; | ||
} | ||
} | ||
class Tolerate2 { | ||
private final Pattern pattern; | ||
public Tolerate2 withPattern(String pattern) { | ||
return withPattern(Pattern.compile(pattern)); | ||
} | ||
public Tolerate2 withPattern(String nameGlob, String extensionGlob) { | ||
return withPattern(nameGlob.replace("*", ".*") + "\\." + extensionGlob.replace("*", ".*")); | ||
} | ||
|
||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Pattern getPattern() { | ||
return this.pattern; | ||
} | ||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Tolerate2 withPattern(final Pattern pattern) { | ||
return this.pattern == pattern ? this : new Tolerate2(pattern); | ||
} | ||
public @java.beans.ConstructorProperties({"pattern"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Tolerate2(final Pattern pattern) { | ||
this.pattern = pattern; | ||
} | ||
} |
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,26 @@ | ||
import java.util.regex.Pattern; | ||
|
||
@lombok.Setter | ||
@lombok.Getter | ||
class Tolerate { | ||
private Pattern pattern; | ||
|
||
@lombok.experimental.Tolerate public void setPattern(String pattern) { | ||
setPattern(Pattern.compile(pattern)); | ||
} | ||
} | ||
|
||
@lombok.Getter | ||
@lombok.experimental.Wither | ||
@lombok.AllArgsConstructor | ||
class Tolerate2 { | ||
private final Pattern pattern; | ||
|
||
@lombok.experimental.Tolerate public Tolerate2 withPattern(String pattern) { | ||
return withPattern(Pattern.compile(pattern)); | ||
} | ||
|
||
public Tolerate2 withPattern(String nameGlob, String extensionGlob) { | ||
return withPattern(nameGlob.replace("*", ".*") + "\\." + extensionGlob.replace("*", ".*")); | ||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
lombok-plugin/src/test/java/de/plushnikov/lombok/tests/TolerateTest.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,15 @@ | ||
package de.plushnikov.lombok.tests; | ||
|
||
import de.plushnikov.lombok.LombokParsingTestCase; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Unit tests for IntelliJPlugin for Lombok, based on lombok test classes | ||
*/ | ||
public class TolerateTest extends LombokParsingTestCase { | ||
|
||
public void testTolerateTest() throws IOException { | ||
doTest(); | ||
} | ||
} |