org.wildfly.common.Assert.unsupported()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.wildfly.common.Assert.unsupported()方法的一些代码示例,展示了Assert.unsupported()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.unsupported()方法的具体详情如下:
包路径:org.wildfly.common.Assert
类名称:Assert
方法名:unsupported

Assert.unsupported介绍

[英]Return an exception explaining that the caller's method is not supported.
[中]返回一个异常,解释调用方的方法不受支持。

代码示例

代码示例来源:origin: wildfly/wildfly

public ConnectionPeerIdentityContext getPeerIdentityContext() {
  final ConnectionPeerIdentityContext peerIdentityContext = this.peerIdentityContext;
  if (peerIdentityContext == null) {
    throw Assert.unsupported();
  }
  return peerIdentityContext;
}

代码示例来源:origin: wildfly/wildfly

/**
   * Unsupported.
   *
   * @param e ignored
   */
  public void add(final E e) {
    throw Assert.unsupported();
  }
}

代码示例来源:origin: wildfly/wildfly

/**
 * Not supported.
 *
 * @return nothing
 * @throws UnsupportedOperationException always
 */
public String readLine() throws UnsupportedOperationException {
  throw Assert.unsupported();
}

代码示例来源:origin: wildfly/wildfly

/**
 * Add a mapping for the given key at the given position.
 *
 * @param key the key
 * @param idx the index
 * @param value the mapping value
 * @throws IndexOutOfBoundsException if {@code idx} is less than 0 or greater than or equal to {@code size(key)}
 * @throws UnsupportedOperationException if this method is not implemented and the operation is not supported
 */
default void add(String key, int idx, String value) {
  throw Assert.unsupported();
}

代码示例来源:origin: wildfly/wildfly

/**
 * Unsupported.
 *
 * @param e ignored
 */
public void set(final E e) {
  throw Assert.unsupported();
}

代码示例来源:origin: wildfly/wildfly

/**
 * Unsupported.
 */
public void remove() {
  throw Assert.unsupported();
}

代码示例来源:origin: wildfly/wildfly

/**
   * Unsupported.
   *
   * @param e ignored
   */
  public void add(final E e) {
    throw Assert.unsupported();
  }
}

代码示例来源:origin: wildfly/wildfly

/**
 * Remove all values for the given key from this collection.
 *
 * @param key the key
 * @return {@code true} if the key was found, {@code false} otherwise
 * @throws UnsupportedOperationException if this method is not implemented and the operation is not supported
 */
default boolean remove(String key) {
  throw Assert.unsupported();
}

代码示例来源:origin: wildfly/wildfly

/**
 * Clear this collection, resetting its size to zero.
 *
 * @throws UnsupportedOperationException if this method is not implemented and the operation is not supported
 */
default void clear() {
  throw Assert.unsupported();
}

代码示例来源:origin: wildfly/wildfly

public Enumeration<Permission> elements() {
    // TODO: this is theoretically possible to implement using an IntersectionCollectionPermission;
    // however the primary use case is going to be in protection domains and verification scenarios so we may
    // not ever actually need this
    throw Assert.unsupported();
  }
}

代码示例来源:origin: wildfly/wildfly

/**
 * Unsupported.
 */
public void remove() {
  throw Assert.unsupported();
}

代码示例来源:origin: wildfly/wildfly

/**
 * Unsupported.
 *
 * @param e ignored
 */
public void set(final E e) {
  throw Assert.unsupported();
}

代码示例来源:origin: wildfly/wildfly

public void remove() {
    throw Assert.unsupported();
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
public Control[] getResponseControls() throws NamingException {
  if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported();
  return ((LdapContext) delegating).getResponseControls();
}

代码示例来源:origin: wildfly/wildfly

@Override
public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException {
  if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported();
  return ((LdapContext) delegating).extendedOperation(request);
}

代码示例来源:origin: wildfly/wildfly

@Override
public Control[] getConnectControls() throws NamingException {
  if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported();
  return ((LdapContext) delegating).getConnectControls();
}

代码示例来源:origin: wildfly/wildfly

@Override
public void setRequestControls(Control[] requestControls) throws NamingException {
  if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported();
  ((LdapContext) delegating).setRequestControls(requestControls);
}

代码示例来源:origin: wildfly/wildfly

@Override
public Control[] getRequestControls() throws NamingException {
  if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported();
  return ((LdapContext) delegating).getRequestControls();
}

代码示例来源:origin: wildfly/wildfly

@Override
public LdapContext newInstance(Control[] requestControls) throws NamingException {
  if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported();
  LdapContext newContext = ((LdapContext) delegating).newInstance(requestControls);
  return new DelegatingLdapContext(newContext, socketFactory);
}

代码示例来源:origin: wildfly/wildfly

@Override
public void reconnect(Control[] controls) throws NamingException {
  if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported();
  ClassLoader previous = setSocketFactory();
  try {
    ((LdapContext) delegating).reconnect(controls);
  } finally {
    unsetSocketFactory(previous);
  }
}

相关文章