java.lang.Object
org.kohsuke.github.example.dataobject.ReadOnlyObjects
GHMeta
wraps the list of GitHub's IP addresses.
This class is used to show examples of different ways to create simple read-only data objects. For data objects that can be modified, perform actions, or get other objects we'll need other examples.
IMPORTANT: There is no one right way to do this, but there are better and worse.
- Better:
ReadOnlyObjects.GHMetaGettersUnmodifiable
is a good balance of clarity and brevity - Worse:
ReadOnlyObjects.GHMetaPublic
exposes setters that are not needed, making it unclear that fields are actually read-only
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
All GHMeta data objects should expose these values.static class
This version uses only public getters and returns unmodifiable lists and has final fieldsstatic class
This version uses only public getters and returns unmodifiable listsstatic class
This version uses only public getters and returns unmodifiable lists.static class
This version uses public getters and shows that package or private setters both can be used by jackson.static class
This version uses public getters and setters and leaves it up to Jackson how it wants to fill them. -
Constructor Summary
-
Method Summary
-
Constructor Details
-
ReadOnlyObjects
public ReadOnlyObjects()Placeholder constructor.
-