class CheckSignatureAdapter extends SignatureVisitor {

  @Override
  public void visitBaseType(final char descriptor) {
    if (type != TYPE_SIGNATURE || state != State.EMPTY) {
      throw new IllegalStateException();
    }
    if (descriptor == 'V') {
      if (!canBeVoid) {
        throw new IllegalArgumentException("Base type descriptor can't be V");
      }
    } else {
      if ("ZCBSIFJD".indexOf(descriptor) == -1) {
        throw new IllegalArgumentException("Base type descriptor must be one of ZCBSIFJD");
      }
    }
    state = State.SIMPLE_TYPE;
    if (signatureVisitor != null) {
      signatureVisitor.visitBaseType(descriptor);
    }
  }

  public  CheckSignatureAdapter(final int type, final SignatureVisitor signatureVisitor);
  protected  CheckSignatureAdapter(
      final int api, final int type, final SignatureVisitor signatureVisitor);

}