Search in sources :

Example 11 with HelperAlreadyDefinedException

use of com.ibm.oti.shared.HelperAlreadyDefinedException in project openj9 by eclipse.

the class TokenGetDifferentHelperTest method run.

public void run() {
    boolean resultURL = false;
    boolean resultURLCP = false;
    URLClassPathCreator pathCreator = new URLClassPathCreator("./Pets;");
    CustomTokenClassLoader loader = new CustomTokenClassLoader(pathCreator.createURLClassPath());
    try {
        loader.getURLClasspathHelper();
    } catch (HelperAlreadyDefinedException e) {
        resultURLCP = true;
    } catch (Exception e) {
        e.printStackTrace();
    }
    try {
        loader.getURLHelper();
    } catch (HelperAlreadyDefinedException e) {
        resultURL = true;
    } catch (Exception e) {
        e.printStackTrace();
    }
    if ((resultURLCP == true) && (resultURL == true)) {
        System.out.println("\nTEST PASSED");
    } else {
        System.out.println("\nTEST FAILED");
    }
}
Also used : CustomTokenClassLoader(CustomCLs.CustomTokenClassLoader) URLClassPathCreator(Utilities.URLClassPathCreator) HelperAlreadyDefinedException(com.ibm.oti.shared.HelperAlreadyDefinedException) HelperAlreadyDefinedException(com.ibm.oti.shared.HelperAlreadyDefinedException)

Example 12 with HelperAlreadyDefinedException

use of com.ibm.oti.shared.HelperAlreadyDefinedException in project openj9 by eclipse.

the class CustomURLClassLoaderNonConfirming method getHelper.

public boolean getHelper() {
    SharedClassHelperFactory schFactory = Shared.getSharedClassHelperFactory();
    SharedClassURLClasspathHelper newHelper = null;
    try {
        newHelper = schFactory.getURLClasspathHelper(this, orgUrls);
    } catch (HelperAlreadyDefinedException e) {
        return false;
    }
    if (newHelper.equals(scHelper)) {
        return true;
    } else {
        return false;
    }
}
Also used : HelperAlreadyDefinedException(com.ibm.oti.shared.HelperAlreadyDefinedException) SharedClassHelperFactory(com.ibm.oti.shared.SharedClassHelperFactory) SharedClassURLClasspathHelper(com.ibm.oti.shared.SharedClassURLClasspathHelper)

Example 13 with HelperAlreadyDefinedException

use of com.ibm.oti.shared.HelperAlreadyDefinedException in project openj9 by eclipse.

the class CustomPartitioningURLCL method getHelper.

public boolean getHelper() {
    SharedClassHelperFactory schFactory = Shared.getSharedClassHelperFactory();
    SharedClassURLClasspathHelper newHelper = null;
    try {
        newHelper = schFactory.getURLClasspathHelper(this, orgUrls);
    } catch (HelperAlreadyDefinedException e) {
        return false;
    }
    if (newHelper.equals(scHelper)) {
        return true;
    } else {
        return false;
    }
}
Also used : HelperAlreadyDefinedException(com.ibm.oti.shared.HelperAlreadyDefinedException) SharedClassHelperFactory(com.ibm.oti.shared.SharedClassHelperFactory) SharedClassURLClasspathHelper(com.ibm.oti.shared.SharedClassURLClasspathHelper)

Example 14 with HelperAlreadyDefinedException

use of com.ibm.oti.shared.HelperAlreadyDefinedException in project openj9 by eclipse.

the class CustomURLClassLoader method getHelper.

public boolean getHelper() {
    SharedClassHelperFactory schFactory = Shared.getSharedClassHelperFactory();
    SharedClassURLClasspathHelper newHelper = null;
    try {
        newHelper = schFactory.getURLClasspathHelper(this, orgUrls);
    } catch (HelperAlreadyDefinedException e) {
        return false;
    }
    if (newHelper.equals(scHelper)) {
        return true;
    } else {
        return false;
    }
}
Also used : HelperAlreadyDefinedException(com.ibm.oti.shared.HelperAlreadyDefinedException) SharedClassHelperFactory(com.ibm.oti.shared.SharedClassHelperFactory) SharedClassURLClasspathHelper(com.ibm.oti.shared.SharedClassURLClasspathHelper)

Aggregations

HelperAlreadyDefinedException (com.ibm.oti.shared.HelperAlreadyDefinedException)14 SharedClassHelperFactory (com.ibm.oti.shared.SharedClassHelperFactory)11 SharedClassURLClasspathHelper (com.ibm.oti.shared.SharedClassURLClasspathHelper)11 URLClassPathCreator (Utilities.URLClassPathCreator)5 CustomURLClassLoader (CustomCLs.CustomURLClassLoader)3 Method (java.lang.reflect.Method)3 CustomTokenClassLoader (CustomCLs.CustomTokenClassLoader)1 CustomURLLoader (CustomCLs.CustomURLLoader)1 CannotSetClasspathException (com.ibm.oti.shared.CannotSetClasspathException)1 SharedClassURLHelper (com.ibm.oti.shared.SharedClassURLHelper)1