Link Search Menu Expand Document

Object

Table of contents

  1. Object
    1. Object.getClassRef(String) -> Result
    2. Object.createFrom(String) -> Result

Object

To make use of the Object module an import is required.

import Object;

Object.getClassRef(String) -> Result

This method will attempt to get a class reference from the class name provided as a string.

Returns a Result and unwraps to an Object upon success.

NOTE: This currently only works if the class is defined in the global scope

class Test {}

Object.getClassRef("Test").unwrap(); // <Cls Test>

Object.createFrom(String) -> Result

This method will attempt to create a new object from the class name provided as a string.

Returns a Result and unwraps to an Object upon success.

NOTE: This currently only works if the class is defined in the global scope

class Test {}

Object.createFrom("Test").unwrap(); // <Test instance>

This site uses Just The Docs, with modifications.