public static boolean isInstanceOf(Object obj,String type){
  if (obj == null)   return false;
  if (type == null)   return false;
  return isInstanceOf(obj.getClass(),type);
}

public static boolean isInstanceOf ( Object obj , String type ) { if ( obj == null ) return false ; if ( type == null ) return false ; return isInstanceOf ( obj . getClass ( ) , type ) ; }
checks that the given object implements / extends the given interface / class . note that using the instanceof operator causes a class to be loaded . using this method doesn ' t load a class and it can be used instead of the instanceof operator for performance reasons .
