- All Superinterfaces:
- InstanceCookie, Node.Cookie
- Enclosing interface:
public static interface InstanceCookie.Of
- extends InstanceCookie
Enhanced cookie that can answer queries about the type of the
instance it creates. It does not add any additional ability except to
improve performance, because it is not necessary to load
the actual class of the object into memory.
Checks if the object created by this cookie is an
instance of the given type.
boolean instanceOf(Class<?> type)
- Checks if the object created by this cookie is an
instance of the given type. The same as
But this can prevent the actual class from being
loaded into the Java VM.
type - the class type we want to check
- true if this cookie will produce an instance of the given type