Java Code Examples for com.sun.org.apache.xml.internal.security.transforms.Transform#register()
The following examples show how to use
com.sun.org.apache.xml.internal.security.transforms.Transform#register() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClassLoaderTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 2
Source File: ClassLoaderTest.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 3
Source File: ClassLoaderTest.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 4
Source File: ClassLoaderTest.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 5
Source File: ClassLoaderTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 6
Source File: ClassLoaderTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 7
Source File: ClassLoaderTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 8
Source File: ClassLoaderTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 9
Source File: ClassLoaderTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { File file = new File(BASE); URL[] urls = new URL[1]; urls[0] = file.toURI().toURL(); URLClassLoader ucl = new URLClassLoader(urls); Class<?> c = ucl.loadClass("MyTransform"); Constructor<?> cons = c.getConstructor(new Class[] {}); Object o = cons.newInstance(); // Apache code swallows the ClassNotFoundExc, so we need to // check if the Transform has already been registered by registering // it again and catching an AlgorithmAlreadyRegisteredExc try { Transform.register(MyTransform.URI, "MyTransform"); throw new Exception("ClassLoaderTest failed"); } catch (AlgorithmAlreadyRegisteredException e) { // test passed } }
Example 10
Source File: MyTransform.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 11
Source File: MyTransform.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 12
Source File: MyTransform.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 13
Source File: MyTransform.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 14
Source File: MyTransform.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 15
Source File: MyTransform.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 16
Source File: MyTransform.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 17
Source File: MyTransform.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 18
Source File: MyTransform.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 19
Source File: MyTransform.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }
Example 20
Source File: MyTransform.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public MyTransform() { try { System.out.println("Registering Transform"); Transform.register(URI, "MyTransform"); } catch (Exception e) { e.printStackTrace(); } }