MCPcopy Create free account
hub / github.com/PCGen/pcgen / getLoadID

Method getLoadID

code/src/java/pcgen/gui2/facade/CoreUtils.java:153–177  ·  view source on GitHub ↗
(T obj)

Source from the content-addressed store, hash-verified

151 }
152
153 private static <T> String getLoadID(T obj)
154 {
155 if (obj instanceof Identified l)
156 {
157 String name = l.getDisplayName();
158 String id = obj.getClass().getSimpleName() + ": " + name;
159 if (!l.getKeyName().equals(name))
160 {
161 id = id + " [" + l.getKeyName() + "]";
162 }
163 return id;
164 }
165 else if (obj instanceof QualifiedObject<?> qo)
166 {
167 return getLoadID(qo.getRawObject());
168 }
169 else if (obj instanceof CDOMReference<?> ref)
170 {
171 return ref.getReferenceClass().getSimpleName() + " Primitive: " + ref.getLSTformat(false);
172 }
173 else
174 {
175 return obj.getClass().getSimpleName() + ": " + obj.toString();
176 }
177 }
178
179 private static String getRequirementsInfo(PlayerCharacter pc, Object object)
180 {

Callers 3

buildCoreDebugListMethod · 0.95
toStringMethod · 0.80
toStringMethod · 0.80

Calls 8

getSimpleNameMethod · 0.80
getRawObjectMethod · 0.80
getDisplayNameMethod · 0.65
equalsMethod · 0.65
getKeyNameMethod · 0.65
getReferenceClassMethod · 0.65
getLSTformatMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected