javassist.Loader.delegateToParent()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(161)

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

Loader.delegateToParent介绍

暂无

代码示例

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

  1. protected Class loadClassByDelegation(String name)
  2. throws ClassNotFoundException
  3. {
  4. /* The swing components must be loaded by a system
  5. * class loader.
  6. * javax.swing.UIManager loads a (concrete) subclass
  7. * of LookAndFeel by a system class loader and cast
  8. * an instance of the class to LookAndFeel for
  9. * (maybe) a security reason. To avoid failure of
  10. * type conversion, LookAndFeel must not be loaded
  11. * by this class loader.
  12. */
  13. Class c = null;
  14. if (doDelegation)
  15. if (name.startsWith("java.")
  16. || name.startsWith("javax.")
  17. || name.startsWith("sun.")
  18. || name.startsWith("com.sun.")
  19. || name.startsWith("org.w3c.")
  20. || name.startsWith("org.xml.")
  21. || notDelegated(name))
  22. c = delegateToParent(name);
  23. return c;
  24. }

代码示例来源:origin: org.javassist/javassist

  1. protected Class<?> loadClassByDelegation(String name)
  2. throws ClassNotFoundException
  3. {
  4. /* The swing components must be loaded by a system
  5. * class loader.
  6. * javax.swing.UIManager loads a (concrete) subclass
  7. * of LookAndFeel by a system class loader and cast
  8. * an instance of the class to LookAndFeel for
  9. * (maybe) a security reason. To avoid failure of
  10. * type conversion, LookAndFeel must not be loaded
  11. * by this class loader.
  12. */
  13. Class<?> c = null;
  14. if (doDelegation)
  15. if (name.startsWith("java.")
  16. || name.startsWith("javax.")
  17. || name.startsWith("sun.")
  18. || name.startsWith("com.sun.")
  19. || name.startsWith("org.w3c.")
  20. || name.startsWith("org.xml.")
  21. || notDelegated(name))
  22. c = delegateToParent(name);
  23. return c;
  24. }

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

  1. /**
  2. * Requests the class loader to load a class.
  3. */
  4. protected Class loadClass(String name, boolean resolve)
  5. throws ClassFormatError, ClassNotFoundException {
  6. name = name.intern();
  7. synchronized (name) {
  8. Class c = findLoadedClass(name);
  9. if (c == null)
  10. c = loadClassByDelegation(name);
  11. if (c == null)
  12. c = findClass(name);
  13. if (c == null)
  14. c = delegateToParent(name);
  15. if (resolve)
  16. resolveClass(c);
  17. return c;
  18. }
  19. }

代码示例来源:origin: org.javassist/javassist

  1. /**
  2. * Requests the class loader to load a class.
  3. */
  4. @Override
  5. protected Class<?> loadClass(String name, boolean resolve)
  6. throws ClassFormatError, ClassNotFoundException {
  7. name = name.intern();
  8. synchronized (name) {
  9. Class<?> c = findLoadedClass(name);
  10. if (c == null)
  11. c = loadClassByDelegation(name);
  12. if (c == null)
  13. c = findClass(name);
  14. if (c == null)
  15. c = delegateToParent(name);
  16. if (resolve)
  17. resolveClass(c);
  18. return c;
  19. }
  20. }

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

  1. protected Class loadClassByDelegation(String name)
  2. throws ClassNotFoundException
  3. {
  4. /* The swing components must be loaded by a system
  5. * class loader.
  6. * javax.swing.UIManager loads a (concrete) subclass
  7. * of LookAndFeel by a system class loader and cast
  8. * an instance of the class to LookAndFeel for
  9. * (maybe) a security reason. To avoid failure of
  10. * type conversion, LookAndFeel must not be loaded
  11. * by this class loader.
  12. */
  13. Class c = null;
  14. if (doDelegation)
  15. if (name.startsWith("java.")
  16. || name.startsWith("javax.")
  17. || name.startsWith("sun.")
  18. || name.startsWith("com.sun.")
  19. || name.startsWith("org.w3c.")
  20. || name.startsWith("org.xml.")
  21. || notDelegated(name))
  22. c = delegateToParent(name);
  23. return c;
  24. }

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

  1. protected Class loadClassByDelegation(String name)
  2. throws ClassNotFoundException
  3. {
  4. /* The swing components must be loaded by a system
  5. * class loader.
  6. * javax.swing.UIManager loads a (concrete) subclass
  7. * of LookAndFeel by a system class loader and cast
  8. * an instance of the class to LookAndFeel for
  9. * (maybe) a security reason. To avoid failure of
  10. * type conversion, LookAndFeel must not be loaded
  11. * by this class loader.
  12. */
  13. Class c = null;
  14. if (doDelegation)
  15. if (name.startsWith("java.")
  16. || name.startsWith("javax.")
  17. || name.startsWith("sun.")
  18. || name.startsWith("com.sun.")
  19. || name.startsWith("org.w3c.")
  20. || name.startsWith("org.xml.")
  21. || notDelegated(name))
  22. c = delegateToParent(name);
  23. return c;
  24. }

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

  1. protected Class loadClassByDelegation(String name)
  2. throws ClassNotFoundException
  3. {
  4. /* The swing components must be loaded by a system
  5. * class loader.
  6. * javax.swing.UIManager loads a (concrete) subclass
  7. * of LookAndFeel by a system class loader and cast
  8. * an instance of the class to LookAndFeel for
  9. * (maybe) a security reason. To avoid failure of
  10. * type conversion, LookAndFeel must not be loaded
  11. * by this class loader.
  12. */
  13. Class c = null;
  14. if (doDelegation)
  15. if (name.startsWith("java.")
  16. || name.startsWith("javax.")
  17. || name.startsWith("sun.")
  18. || name.startsWith("com.sun.")
  19. || name.startsWith("org.w3c.")
  20. || name.startsWith("org.xml.")
  21. || notDelegated(name))
  22. c = delegateToParent(name);
  23. return c;
  24. }

代码示例来源:origin: org.jboss/javassist

  1. protected Class loadClassByDelegation(String name)
  2. throws ClassNotFoundException
  3. {
  4. /* The swing components must be loaded by a system
  5. * class loader.
  6. * javax.swing.UIManager loads a (concrete) subclass
  7. * of LookAndFeel by a system class loader and cast
  8. * an instance of the class to LookAndFeel for
  9. * (maybe) a security reason. To avoid failure of
  10. * type conversion, LookAndFeel must not be loaded
  11. * by this class loader.
  12. */
  13. Class c = null;
  14. if (doDelegation)
  15. if (name.startsWith("java.")
  16. || name.startsWith("javax.")
  17. || name.startsWith("sun.")
  18. || name.startsWith("com.sun.")
  19. || name.startsWith("org.w3c.")
  20. || name.startsWith("org.xml.")
  21. || notDelegated(name))
  22. c = delegateToParent(name);
  23. return c;
  24. }

代码示例来源:origin: org.jboss.javassist/com.springsource.javassist

  1. protected Class loadClassByDelegation(String name)
  2. throws ClassNotFoundException
  3. {
  4. /* The swing components must be loaded by a system
  5. * class loader.
  6. * javax.swing.UIManager loads a (concrete) subclass
  7. * of LookAndFeel by a system class loader and cast
  8. * an instance of the class to LookAndFeel for
  9. * (maybe) a security reason. To avoid failure of
  10. * type conversion, LookAndFeel must not be loaded
  11. * by this class loader.
  12. */
  13. Class c = null;
  14. if (doDelegation)
  15. if (name.startsWith("java.")
  16. || name.startsWith("javax.")
  17. || name.startsWith("sun.")
  18. || name.startsWith("com.sun.")
  19. || name.startsWith("org.w3c.")
  20. || name.startsWith("org.xml.")
  21. || notDelegated(name))
  22. c = delegateToParent(name);
  23. return c;
  24. }

代码示例来源:origin: org.jboss.javassist/com.springsource.javassist

  1. /**
  2. * Requests the class loader to load a class.
  3. */
  4. protected Class loadClass(String name, boolean resolve)
  5. throws ClassFormatError, ClassNotFoundException {
  6. name = name.intern();
  7. synchronized (name) {
  8. Class c = findLoadedClass(name);
  9. if (c == null)
  10. c = loadClassByDelegation(name);
  11. if (c == null)
  12. c = findClass(name);
  13. if (c == null)
  14. c = delegateToParent(name);
  15. if (resolve)
  16. resolveClass(c);
  17. return c;
  18. }
  19. }

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

  1. /**
  2. * Requests the class loader to load a class.
  3. */
  4. protected Class loadClass(String name, boolean resolve)
  5. throws ClassFormatError, ClassNotFoundException {
  6. name = name.intern();
  7. synchronized (name) {
  8. Class c = findLoadedClass(name);
  9. if (c == null)
  10. c = loadClassByDelegation(name);
  11. if (c == null)
  12. c = findClass(name);
  13. if (c == null)
  14. c = delegateToParent(name);
  15. if (resolve)
  16. resolveClass(c);
  17. return c;
  18. }
  19. }

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

  1. /**
  2. * Requests the class loader to load a class.
  3. */
  4. protected Class loadClass(String name, boolean resolve)
  5. throws ClassFormatError, ClassNotFoundException {
  6. name = name.intern();
  7. synchronized (name) {
  8. Class c = findLoadedClass(name);
  9. if (c == null)
  10. c = loadClassByDelegation(name);
  11. if (c == null)
  12. c = findClass(name);
  13. if (c == null)
  14. c = delegateToParent(name);
  15. if (resolve)
  16. resolveClass(c);
  17. return c;
  18. }
  19. }

代码示例来源:origin: org.jboss/javassist

  1. /**
  2. * Requests the class loader to load a class.
  3. */
  4. protected Class loadClass(String name, boolean resolve)
  5. throws ClassFormatError, ClassNotFoundException {
  6. name = name.intern();
  7. synchronized (name) {
  8. Class c = findLoadedClass(name);
  9. if (c == null)
  10. c = loadClassByDelegation(name);
  11. if (c == null)
  12. c = findClass(name);
  13. if (c == null)
  14. c = delegateToParent(name);
  15. if (resolve)
  16. resolveClass(c);
  17. return c;
  18. }
  19. }

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

  1. /**
  2. * Requests the class loader to load a class.
  3. */
  4. protected Class loadClass(String name, boolean resolve)
  5. throws ClassFormatError, ClassNotFoundException {
  6. name = name.intern();
  7. synchronized (name) {
  8. Class c = findLoadedClass(name);
  9. if (c == null)
  10. c = loadClassByDelegation(name);
  11. if (c == null)
  12. c = findClass(name);
  13. if (c == null)
  14. c = delegateToParent(name);
  15. if (resolve)
  16. resolveClass(c);
  17. return c;
  18. }
  19. }

相关文章