Flex – How to identify if the Class reference is an interface?

Like Java, I want to know if my reference is declared as Interface.

function foo(classRef:Class ){

if(classRef.isInterface(){
//something
}

}

You can use AS3 Commons Reflect to get this information. Your function looks like this:

function foo(classRef:Class)
{
var type:Type = Type.forClass(classRef);

if (type.isInterface)
{
//something
}
}

Like Java, I want to know if my reference is declared as Interface. < p>

function foo(classRef:Class){

if(classRef.isInterface(){
//something
}

}

You can use AS3 Commons Reflect to get this information. Your function looks like this:

function foo(classRef:Class)
{
var type:Type = Type.forClass(classRef);

if (type.isInterface)
{
//something
}
}

Leave a Comment

Your email address will not be published.