IsInstanceOf()

edit

Determines whether an object is an instance of a Lucee interface or component, or of a Java class.

IsInstanceOf( obj=any, type=string );

Returns: Boolean

Argument Description
obj
any, required
edit

The CFC instance or Java object that you are testing

Alias: value

type
string, required
edit

The name of the interface, component, or Java class of which the object might be an instance.

Examples

edit
writeDump(isInstanceOf({},"java.util.Map")); // true
writeDump(isInstanceOf("Lucee","java.util.Map")); // false
writeDump(isInstanceOf("Lucee","java.lang.String")); // true

See also