MCPcopy Index your code
hub / github.com/PCGen/pcgen / Dynamic

Class Dynamic

code/src/java/pcgen/cdom/inst/Dynamic.java:41–202  ·  view source on GitHub ↗

A Dynamic is an object designed to behave as defined by the Data, rather than having hard-coded behaviors in the PCGen core. By having almost no information hard-coded, this class produces a very flexible framework for use in a data driven system.

Source from the content-addressed store, hash-verified

39 * framework for use in a data driven system.
40 */
41public class Dynamic
42 implements Loadable, VarHolder, VarContainer, PCGenScoped, Categorized<Dynamic>
43{
44
45 /**
46 * The source URI for this Dynamic (where it was first created).
47 */
48 private URI sourceURI;
49
50 /**
51 * The Category of the Dynamic.
52 *
53 * This is the actual type of the dynamic object as the data wishes to refer to that
54 * object. This would be a peer to "SKILL" or "SPELL" for the hard-coded objects.
55 */
56 private Category<Dynamic> category;
57
58 /**
59 * The name of this Dynamic.
60 *
61 * This is effectively the key for the Dynamic.
62 */
63 private String name;
64
65 /**
66 * Support object to store the variable information on an object (i.e. delegate that
67 * implements VarHolder).
68 */
69 private VarHolderSupport varHolder = new VarHolderSupport();
70
71 @Override
72 public URI getSourceURI()
73 {
74 return sourceURI;
75 }
76
77 @Override
78 public void setSourceURI(URI source)
79 {
80 sourceURI = source;
81 }
82
83 @Override
84 public void setName(String name)
85 {
86 this.name = name;
87 }
88
89 @Override
90 public String getDisplayName()
91 {
92 return name;
93 }
94
95 @Override
96 public String getKeyName()
97 {
98 return getDisplayName();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected