public static boolean isCompatible(Class expect,Class type){
  if (expect.isArray()) {
    expect=expect.getComponentType();
  }
  return expect.isAssignableFrom(type);
}

public static boolean isCompatible ( Class expect , Class type ) { if ( expect . isArray ( ) ) { expect = expect . getComponentType ( ) ; } return expect . isAssignableFrom ( type ) ; }
this is used to determine whether the provided base class can be assigned from the issued type . for an override to be compatible with the field type an instance of the override type must be assignable to the field value .
