PlayerMockReflectionUtils
What the engine's own reflection says about a class's events and properties, cached per class -- reflection is far too expensive to walk on every signal or property read, and these sit on the path production takes to connect an input event.
Functions
getEventNames
PlayerMockReflectionUtils.getEventNames(className: string) → {[string]: boolean}?Returns the set of event names reflection reports on the class, own and inherited alike, or nil when there is no such class.
isClassEvent
PlayerMockReflectionUtils.isClassEvent(className: string,eventName: string) → booleanReturns whether the class exists and really has that event.
getPropertyNames
PlayerMockReflectionUtils.getPropertyNames(className: string) → {[string]: boolean}?
Returns the set of property names reflection reports on the class, own and inherited alike, or
nil when there is no such class. Methods are not properties, so a zero-arg getter like
Player:HasAppearanceLoaded() is absent.
getMethodNames
PlayerMockReflectionUtils.getMethodNames(className: string) → {[string]: boolean}?Returns the set of method names reflection reports on the class, own and inherited alike, or nil when there is no such class.
isClassMethod
PlayerMockReflectionUtils.isClassMethod(className: string,methodName: string) → booleanReturns whether the class exists and really has that method.
isClass
PlayerMockReflectionUtils.isClass(className: string) → boolean
Returns whether the engine reflects a class by that name at all. Every class inherits Instance's
own properties, so a real one always reflects some.
isService
PlayerMockReflectionUtils.isService(className: string) → boolean
Returns whether the class names a service -- one of the singletons game:GetService hands out,
rather than an instance class anything can hold. True whether or not the service has been
instantiated in this DataModel.
isClassProperty
PlayerMockReflectionUtils.isClassProperty(className: string,propertyName: string) → booleanReturns whether the class exists and really has that property.
findNativeSignal
Returns the genuine signal for events an instance inherits natively (AncestryChanged,
Destroying, ...), or nil when it exposes no such member. Only the rest need a stand-in.