@Test public void testExtractBeanArchiveId() { assertEquals("/foo_/WEB-INF/classes", BeanArchives.extractBeanArchiveId("/tmp/tomcat/webapps/87b26796-2e95-4f64-8039-409ae1d1b705/WEB-INF/classes", "/foo", "/WEB-INF")); assertEquals("_/WEB-INF/classes", BeanArchives.extractBeanArchiveId("/tmp/tomcat/webapps/87b26796-2e95-4f64-8039-409ae1d1b705/WEB-INF/classes", "", "/WEB-INF")); assertEquals("/foo_/WEB-INF/lib/bar.jar", BeanArchives.extractBeanArchiveId("file: assertEquals("/foo_/WEB-INF/classes", BeanArchives.extractBeanArchiveId("C:\\tmp\\tomcat\\webapps\\87b26796-2e95-4f64-8039-409ae1d1b705\\WEB-INF\\classes", "/foo", "/WEB-INF")); assertEquals("_/test/producer/0.1.0-SNAPSHOT/producer-0.1.0-SNAPSHOT.jar", BeanArchives.extractBeanArchiveId("/test/producer/0.1.0-SNAPSHOT/producer-0.1.0-SNAPSHOT.jar", "", "/WEB-INF")); }
public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { beanArchiveRef = beanArchiveRef.replace('\\', '/'); StringBuilder id = new StringBuilder(); id.append(base); id.append(BeanArchives.BEAN_ARCHIVE_ID_BASE_DELIMITER); if (beanArchiveRef.contains(separator)) { id.append(beanArchiveRef.substring(beanArchiveRef.indexOf(separator), beanArchiveRef.length())); } else { id.append(beanArchiveRef); } return id.toString(); }
BeanArchives { public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { beanArchiveRef = beanArchiveRef.replace('\\', '/'); StringBuilder id = new StringBuilder(); id.append(base); id.append(BeanArchives.BEAN_ARCHIVE_ID_BASE_DELIMITER); if (beanArchiveRef.contains(separator)) { id.append(beanArchiveRef.substring(beanArchiveRef.indexOf(separator), beanArchiveRef.length())); } else { id.append(beanArchiveRef); } return id.toString(); } }
BeanArchives { public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { beanArchiveRef = beanArchiveRef.replace('\\', '/'); StringBuilder id = new StringBuilder(); id.append(base); id.append(BeanArchives.BEAN_ARCHIVE_ID_BASE_DELIMITER); if (beanArchiveRef.contains(separator)) { id.append(beanArchiveRef.substring(beanArchiveRef.indexOf(separator), beanArchiveRef.length())); } else { id.append(beanArchiveRef); } return id.toString(); } private  BeanArchives(); }
BeanArchives { public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { beanArchiveRef = beanArchiveRef.replace('\\', '/'); StringBuilder id = new StringBuilder(); id.append(base); id.append(BeanArchives.BEAN_ARCHIVE_ID_BASE_DELIMITER); if (beanArchiveRef.contains(separator)) { id.append(beanArchiveRef.substring(beanArchiveRef.indexOf(separator), beanArchiveRef.length())); } else { id.append(beanArchiveRef); } return id.toString(); } private  BeanArchives(); static Multimap<String, BeanDeploymentArchive> findBeanClassesDeployedInMultipleBeanArchives(Set<B> beanArchives); static String extractBeanArchiveId(String beanArchiveRef, String base, String separator); }
BeanArchives { public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { beanArchiveRef = beanArchiveRef.replace('\\', '/'); StringBuilder id = new StringBuilder(); id.append(base); id.append(BeanArchives.BEAN_ARCHIVE_ID_BASE_DELIMITER); if (beanArchiveRef.contains(separator)) { id.append(beanArchiveRef.substring(beanArchiveRef.indexOf(separator), beanArchiveRef.length())); } else { id.append(beanArchiveRef); } return id.toString(); } private  BeanArchives(); static Multimap<String, BeanDeploymentArchive> findBeanClassesDeployedInMultipleBeanArchives(Set<B> beanArchives); static String extractBeanArchiveId(String beanArchiveRef, String base, String separator); static final String BEAN_ARCHIVE_ID_BASE_DELIMITER; }