public URL[] getURLs() { return realm.getConstituents(); }
public URL[] getURLs() { return realm.getConstituents(); }
private void showUrls( ClassRealm classRealm ) { System.out.println( "this realm = " + classRealm.getId() ); URL[] urls = classRealm.getConstituents(); for ( int i = 0; i < urls.length; i++ ) { System.out.println( "urls[" + i + "] = " + urls[i] ); } System.out.println( "Number of imports: " + imports.size() ); for ( Iterator i = imports.iterator(); i.hasNext(); ) { System.out.println( "import: " + i.next() ); } } }
protected URL getScriptLocation( ComponentDescriptor componentDescriptor, ClassRealm classRealm ) { String impl = componentDescriptor.getImplementation(); if ( !impl.startsWith( "/" ) ) { impl = "/" + impl; } URL scriptLocation = classRealm.getResource( impl ); if(scriptLocation == null) { System.out.println("Cannot find: " + impl + " in classpath:"); for ( int i = 0; i < classRealm.getConstituents().length; i++ ) { URL constituent = classRealm.getConstituents()[i]; System.out.println("[" + i + "] " + constituent); } } return scriptLocation; }
private void configureClasspath() { String classpath = ""; for (URL url : realm.getConstituents()) { if (!"".equals(classpath)) { classpath += System.getProperty("path.separator"); } try { try { classpath += new File(url.toURI()).getCanonicalPath(); } catch (IOException e) { classpath += new File(url.toURI()).getAbsolutePath(); } } catch (URISyntaxException e) { classpath += url.getFile(); } } javaTask.setClasspath(new Path(antProject, classpath)); }
for (URL url: workflowRealm.getConstituents()) { if (url.getFile()!=null) { final File constituent = new File(url.getFile());
URL[] constituents = realm.getConstituents();
for ( int i = 0; i < containerRealm.getConstituents().length; i++ ) URL constituent = containerRealm.getConstituents()[i]; buf.append( "\n [" + i + "] " + constituent );
for (URL constituent : realm.getConstituents()) { permissions.addConfiguredGrant(createPermission(FilePermission.class, constituent.getFile(), "read"));