MasterLinux / ClassLoader

MIT License
0 stars 0 forks source link

Support getting the type of a field #1

Open Pajn opened 9 years ago

Pajn commented 9 years ago

It would be very useful if one could get type of a field (type if it is an variable or return type if it is an getter).

To clarify I mean type static type of the field. The runtime type can be acquired by getting the field and checking the runtime type of the object.

MasterLinux commented 9 years ago

Yeah, I will implement this functionality in version 0.0.3. Just for clarifying it on my side. Let's say we have a setter like

set isLoading(bool loading) => _isLoading = loading;

you will check whether isLoading is type of bool, right? For example

var isBool = classLoader.fields[#isLoading].isTypeOf(#bool);