Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
b9bf3e92
Unverified
Commit
b9bf3e92
authored
Nov 28, 2018
by
Greg Messner
Committed by
GitHub
Nov 28, 2018
Browse files
Added toString() implementation to model classes (#271)
parent
d5c5bd87
Changes
63
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/TreeItem.java
View file @
b9bf3e92
...
@@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
...
@@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
TreeItem
{
public
class
TreeItem
{
...
@@ -61,4 +63,9 @@ public class TreeItem {
...
@@ -61,4 +63,9 @@ public class TreeItem {
public
void
setType
(
Type
type
)
{
public
void
setType
(
Type
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
@Override
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
}
}
}
src/main/java/org/gitlab4j/api/models/User.java
View file @
b9bf3e92
...
@@ -2,6 +2,8 @@ package org.gitlab4j.api.models;
...
@@ -2,6 +2,8 @@ package org.gitlab4j.api.models;
import
javax.xml.bind.annotation.XmlRootElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlRootElement
public
class
User
extends
AbstractUser
<
User
>
{
public
class
User
extends
AbstractUser
<
User
>
{
...
@@ -46,4 +48,8 @@ public class User extends AbstractUser<User> {
...
@@ -46,4 +48,8 @@ public class User extends AbstractUser<User> {
return
withSharedRunnersMinutesLimit
(
sharedRunnersMinuteLimit
);
return
withSharedRunnersMinutesLimit
(
sharedRunnersMinuteLimit
);
}
}
@Override
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
}
}
}
src/main/java/org/gitlab4j/api/models/WikiPage.java
View file @
b9bf3e92
...
@@ -27,6 +27,8 @@ import javax.xml.bind.annotation.XmlAccessType;
...
@@ -27,6 +27,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
WikiPage
{
public
class
WikiPage
{
...
@@ -76,4 +78,9 @@ public class WikiPage {
...
@@ -76,4 +78,9 @@ public class WikiPage {
public
void
setFormat
(
String
format
)
{
public
void
setFormat
(
String
format
)
{
this
.
format
=
format
;
this
.
format
=
format
;
}
}
@Override
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
}
}
}
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment