MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / getObject

Method getObject

src/org/opensourcephysics/tools/Resource.java:161–169  ·  view source on GitHub ↗

Gets an object of the specified type. Currently the only types recognized are String and ImageIcon. @param type the desired class type @return the object, or null

(Class<?> type)

Source from the content-addressed store, hash-verified

159 * @return the object, or null
160 */
161 public Object getObject(Class<?> type) {
162 if (ImageIcon.class.equals(type)) {
163 return getResizableIcon();
164 }
165 if (String.class.equals(type)) {
166 return getString();
167 }
168 return null;
169 }
170
171 /**
172 * Opens an InputStream.

Callers

nothing calls this directly

Calls 3

getResizableIconMethod · 0.95
getStringMethod · 0.95
equalsMethod · 0.65

Tested by

no test coverage detected