Flex and Java Differences: Getters & Setters

In Java it has become a standard practice to use a getter & setter notation to provide a consistent interface to an object’s properties. There is a reason why we don’t do the following in Java: public String fullName; The code above essentially creates an interface (or contract) between the class and the implementors of this class that does not allow us to change the underlying implementation of what gets returned when the fullName property is accessed on an instance of the class.

Query the Loaded Classes in Flex / AS3

One of the things I love most about programming is running into walls and then finding creative ways to get over (or through) them. The most recent wall I ran into with Flex was that I wanted to be able to find classes at runtime that either implement a given interface or have specific metadata on them. Flash Player doesn’t provide an API to do this directly so I went searching for a workaround.