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
- Loading branch information
Showing
5 changed files
with
59 additions
and
27 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
value-fixture/src/org/immutables/fixture/AllParametersDefaultInit.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 @@ | ||
package org.immutables.fixture; | ||
|
||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@Value.Style(allParameters = true) | ||
interface AllParametersDefaultInit { | ||
@Value.Default | ||
default String getFoo() { | ||
return ""; | ||
} | ||
|
||
@Value.Default | ||
default boolean isBar() { | ||
return true; | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
value-fixture/test/org/immutables/fixture/encoding/UseCompactDate.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 @@ | ||
/* | ||
Copyright 2018 Immutables Authors and Contributors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package org.immutables.fixture.encoding; | ||
|
||
import java.util.Date; | ||
import org.immutables.fixture.encoding.defs.CompactDateEnabled; | ||
import org.immutables.value.Value; | ||
|
||
@CompactDateEnabled | ||
public abstract class UseCompactDate { | ||
public abstract static class Base { | ||
@Value.Default | ||
public Date getFirstSeen() { | ||
return new Date(); | ||
} | ||
|
||
@Value.Default | ||
public Date lastSeen() { | ||
return getFirstSeen(); | ||
} | ||
} | ||
|
||
@Value.Immutable | ||
public abstract static class SomeSubclass extends Base { | ||
public abstract String name(); | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
value-fixture/test/org/immutables/fixture/encoding/UseCompactLocalDateTime.java
This file was deleted.
Oops, something went wrong.
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