getObject method

T getObject(
  1. String name
)

Returns an object that references a component named name.

The returned object is always a reference object; it does not contain actual values of that object.

An object is always returned, even if no component named name exists. If after APIDocumentContext.finalize is called and no object has been registered for name, an error is thrown.

Implementation

T getObject(String name) {
  final obj = _getInstanceOf();
  obj.referenceURI = Uri(path: "/components/$_typeName/$name");
  return obj;
}