org.eclipse.persistence.exceptions.QueryException.methodDoesNotExistInContainerClass()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(71)

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

QueryException.methodDoesNotExistInContainerClass介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
* INTERNAL:
* It is illegal to send this message to this receiver. Try one of my subclasses.
* Throws an exception.
*
* @see #ListContainerPolicy
*/
public void removeFromWithOrder(int beginIndex, Object container) {
  throw QueryException.methodDoesNotExistInContainerClass("remove(index)", getContainerClass());
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
* INTERNAL:
* It is illegal to send this message to this receiver. Try one of my subclasses.
* Throws an exception.
*
* @see #ListContainerPolicy
*/
public void addIntoWithOrder(Vector indexes, Hashtable elements, Object container, AbstractSession session) {
  throw QueryException.methodDoesNotExistInContainerClass("set", getContainerClass());
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
* INTERNAL:
* It is illegal to send this message to this receiver. Try one of my subclasses.
* Throws an exception.
*
* @see #ListContainerPolicy
*/
public void addIntoWithOrder(Integer index, Object element, Object container) {
  throw QueryException.methodDoesNotExistInContainerClass("set", getContainerClass());
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Return the 'clone()' Method for the specified class.
 * Return null if the method does not exist anywhere in the hierarchy
 */
protected Method getCloneMethod(Class javaClass) {
  try {
    // This must not be set "accessible" - clone() must be public, and some JVM's do not allow access to JDK classes.
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
      try {
        return AccessController.doPrivileged(new PrivilegedGetMethod(javaClass, "clone", (Class[])null, false));
      } catch (PrivilegedActionException exception) {
        throw QueryException.methodDoesNotExistInContainerClass("clone", javaClass);
      }
    } else {
      return PrivilegedAccessHelper.getMethod(javaClass, "clone", (Class[])null, false);
    }
  } catch (NoSuchMethodException ex) {
    throw QueryException.methodDoesNotExistInContainerClass("clone", javaClass);
  }
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Return the 'clone()' Method for the specified class.
 * Return null if the method does not exist anywhere in the hierarchy
 */
protected Method getCloneMethod(Class javaClass) {
  try {
    // This must not be set "accessible" - clone() must be public, and some JVM's do not allow access to JDK classes.
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
      try {
        return AccessController.doPrivileged(new PrivilegedGetMethod(javaClass, "clone", (Class[])null, false));
      } catch (PrivilegedActionException exception) {
        throw QueryException.methodDoesNotExistInContainerClass("clone", javaClass);
      }
    } else {
      return PrivilegedAccessHelper.getMethod(javaClass, "clone", (Class[])null, false);
    }
  } catch (NoSuchMethodException ex) {
    throw QueryException.methodDoesNotExistInContainerClass("clone", javaClass);
  }
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Return the 'clone()' Method for the specified class.
 * Return null if the method does not exist anywhere in the hierarchy
 */
protected Method getCloneMethod(Class javaClass) {
  for (Object key; (key = refQueue.poll()) != null;) {
    cloneMethodCache.remove(key);
  }
  Method cloneMethod = cloneMethodCache.get(new ClassWeakReference(javaClass));
  if (cloneMethod != null) {
    return cloneMethod;
  }
  try {
    // This must not be set "accessible" - clone() must be public, and some JVM's do not allow access to JDK classes.
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
      try {
        cloneMethod = AccessController.doPrivileged(new PrivilegedGetMethod(javaClass, "clone", (Class[])null, false));
      } catch (PrivilegedActionException exception) {
        throw QueryException.methodDoesNotExistInContainerClass("clone", javaClass);
      }
    } else {
      cloneMethod = PrivilegedAccessHelper.getMethod(javaClass, "clone", (Class[])null, false);
    }
  } catch (NoSuchMethodException ex) {
    throw QueryException.methodDoesNotExistInContainerClass("clone", javaClass);
  }
  cloneMethodCache.put(new ClassWeakReference(javaClass, refQueue), cloneMethod);
  return cloneMethod;
}

相关文章

微信公众号

最新文章

更多

QueryException类方法