-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Kotlin properties #776
Merged
geralt-encore
merged 3 commits into
pushtorefresh:master
from
geralt-encore:kotlin-properties
Apr 18, 2017
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...essor/src/main/kotlin/com/pushtorefresh/storio/common/annotations/processor/Extensions.kt
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,4 @@ | ||
package com.pushtorefresh.storio.common.annotations.processor | ||
|
||
fun String.startsWithIs(): Boolean = this.startsWith("is") && this.length > 2 | ||
&& Character.isUpperCase(this[2]) |
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
71 changes: 71 additions & 0 deletions
71
...ntent-resolver-annotations-processor-test/src/test/resources/BoxedTypesPrivateFields.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,71 @@ | ||
package com.pushtorefresh.storio.contentresolver.annotations; | ||
|
||
@StorIOContentResolverType(uri = "content://uri") | ||
public class BoxedTypesPrivateFields { | ||
|
||
@StorIOContentResolverColumn(name = "field1") | ||
private Boolean field1; | ||
|
||
@StorIOContentResolverColumn(name = "field2") | ||
private Short field2; | ||
|
||
@StorIOContentResolverColumn(name = "field3") | ||
private Integer field3; | ||
|
||
@StorIOContentResolverColumn(name = "field4", key = true) | ||
private Long field4; | ||
|
||
@StorIOContentResolverColumn(name = "field5") | ||
private Float field5; | ||
|
||
@StorIOContentResolverColumn(name = "field6") | ||
private Double field6; | ||
|
||
public Boolean getField1() { | ||
return field1; | ||
} | ||
|
||
public void setField1(Boolean field1) { | ||
this.field1 = field1; | ||
} | ||
|
||
public Short getField2() { | ||
return field2; | ||
} | ||
|
||
public void setField2(Short field2) { | ||
this.field2 = field2; | ||
} | ||
|
||
public Integer getField3() { | ||
return field3; | ||
} | ||
|
||
public void setField3(Integer field3) { | ||
this.field3 = field3; | ||
} | ||
|
||
public Long getField4() { | ||
return field4; | ||
} | ||
|
||
public void setField4(Long field4) { | ||
this.field4 = field4; | ||
} | ||
|
||
public Float getField5() { | ||
return field5; | ||
} | ||
|
||
public void setField5(Float field5) { | ||
this.field5 = field5; | ||
} | ||
|
||
public Double getField6() { | ||
return field6; | ||
} | ||
|
||
public void setField6(Double field6) { | ||
this.field6 = field6; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...-processor-test/src/test/resources/BoxedTypesPrivateFieldsContentResolverTypeMapping.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,14 @@ | ||
package com.pushtorefresh.storio.contentresolver.annotations; | ||
|
||
import com.pushtorefresh.storio.contentresolver.ContentResolverTypeMapping; | ||
|
||
/** | ||
* Generated mapping with collection of resolvers | ||
*/ | ||
public class BoxedTypesPrivateFieldsContentResolverTypeMapping extends ContentResolverTypeMapping<BoxedTypesPrivateFields> { | ||
public BoxedTypesPrivateFieldsContentResolverTypeMapping() { | ||
super(new BoxedTypesPrivateFieldsStorIOContentResolverPutResolver(), | ||
new BoxedTypesPrivateFieldsStorIOContentResolverGetResolver(), | ||
new BoxedTypesPrivateFieldsStorIOContentResolverDeleteResolver()); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😐