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.GHMetaGettersUnmodifiableis a good balance of clarity and brevity - Worse:
ReadOnlyObjects.GHMetaPublicexposes setters that are not needed, making it unclear that fields are actually read-only
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAll GHMeta data objects should expose these values.static classThis version uses only public getters and returns unmodifiable lists and has final fieldsstatic classThis version uses only public getters and returns unmodifiable listsstatic classThis version uses only public getters and returns unmodifiable lists.static classThis version uses public getters and shows that package or private setters both can be used by jackson.static classThis version uses public getters and setters and leaves it up to Jackson how it wants to fill them. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ReadOnlyObjects
public ReadOnlyObjects()Placeholder constructor.
-