Examples of ClasspathScanner


Examples of org.directwebremoting.util.ClasspathScanner

                    if (element.endsWith(".*") || element.endsWith(".**")) {
                        try {
                            boolean recursive = element.endsWith(".**");
                            String packageName = element.substring(0, element.length() - 2 - (recursive ? 1 : 0));
                            Set<String> classesInPackage = new ClasspathScanner(packageName, recursive).getClasses();
                            for (String className : classesInPackage) {
                                Class<?> clazz = LocalUtil.classForName(className);
                                classes.add(clazz);
                            }
                        }
View Full Code Here

Examples of org.directwebremoting.util.ClasspathScanner

        if (LocalUtil.hasText(match) && match.contains("*") && !match.startsWith("["))
        {
            boolean recursive = match.endsWith("**");
            String scan = recursive ? match.substring(0, match.length() - 1) : match;

            ClasspathScanner scanner = new ClasspathScanner(scan, recursive);
            for (String clazz : scanner.getClasses())
            {
                // Call ourselves without the wildcard, processed by the else below
                addConverter(clazz, converter);
            }
        }
View Full Code Here

Examples of org.hotswap.agent.util.scanner.ClassPathScanner

     */
    public void scan() throws Exception {
        StringBuilder html = new StringBuilder();
        addHtmlHeader(html);

        ClassPathAnnotationScanner scanner = new ClassPathAnnotationScanner(Plugin.class.getName(), new ClassPathScanner());

        for (String plugin : scanner.scanPlugins(getClass().getClassLoader(), PluginManager.PLUGIN_PACKAGE.replace(".", "/"))) {
            Class pluginClass = Class.forName(plugin);
            Plugin pluginAnnotation = (Plugin) pluginClass.getAnnotation(Plugin.class);

View Full Code Here

Examples of org.hotswap.agent.util.scanner.ClassPathScanner

     * Create an instanec of plugin registry and initialize scanner and processor.
     */
    public PluginRegistry(PluginManager pluginManager, ClassLoaderPatcher classLoaderPatcher) {
        this.pluginManager = pluginManager;
        this.classLoaderPatcher = classLoaderPatcher;
        annotationScanner = new ClassPathAnnotationScanner(Plugin.class.getName(), new ClassPathScanner());
        annotationProcessor = new AnnotationProcessor(pluginManager);
    }
View Full Code Here

Examples of org.hotswap.agent.util.scanner.ClassPathScanner

                      final ClassLoader classLoaderTo, final ProtectionDomain protectionDomain) {

        final ClassPool cp = new ClassPool();
        cp.appendClassPath(new LoaderClassPath(getClass().getClassLoader()));

        Scanner scanner = new ClassPathScanner();

        try {
            scanner.scan(classLoaderFrom, pluginPath, new ScannerVisitor() {
                @Override
                public void visit(InputStream file) throws IOException {
                    try {
                        CtClass patchClass = cp.makeClass(file);
View Full Code Here

Examples of org.mule.util.scan.ClasspathScanner

        String[] paths = convertPackagesToPaths(basepackages);
        if(logger.isInfoEnabled())
        {
            logger.info("Scanning for annotations using the following paths: " + StringMessageUtils.toString(paths));
        }
        return new ClasspathScanner(classLoader, paths);
    }
View Full Code Here

Examples of org.mule.util.scan.ClasspathScanner

    @Override
    protected void doConfigure(MuleContext muleContext) throws Exception
    {
        Set<Class<?>> ibeanClasses = new HashSet<Class<?>>();
        ClasspathScanner scanner = createClasspathScanner();

        try
        {
            //There will be some overlap here but only
            ibeanClasses.addAll(scanner.scanFor(Call.class, ClasspathScanner.INCLUDE_INTERFACE));
            ibeanClasses.addAll(scanner.scanFor(Template.class, ClasspathScanner.INCLUDE_INTERFACE));
            //Some ibeans will extend other iBeans but have not methods of there own
            ibeanClasses.addAll(scanner.scanFor(IBeanGroup.class, ClasspathScanner.INCLUDE_INTERFACE));
        }
        catch (IOException e)
        {
            throw new ConfigurationException(e);
        }
View Full Code Here

Examples of org.mule.util.scan.ClasspathScanner

        //No modules were set explicitly on this ConfigurationBuilder so we now try and discover
        //modules and {@link GuiceModuleFactory} instances on the classpath
        if (modules == null)
        {
            ClasspathScanner scanner = new ClasspathScanner(classLoader, basepath);
            Set<Class<Module>> classes = scanner.scanFor(Module.class);
            Set<Class<GuiceModuleFactory>> factories = scanner.scanFor(GuiceModuleFactory.class);

            if (classes.size() == 0 && factories.size() == 0)
            {
                try
                {
View Full Code Here

Examples of org.mule.util.scan.ClasspathScanner

        //No modules were set explicitly on this ConfigurationBuilder so we now try and discover
        //modules and {@link GuiceModuleFactory} instances on the classpath
        if (modules == null)
        {
            ClasspathScanner scanner = new ClasspathScanner(classLoader, basepath);
            Set<Class<Module>> classes = scanner.scanFor(Module.class);
            Set<Class<GuiceModuleFactory>> factories = scanner.scanFor(GuiceModuleFactory.class);

            if (classes.size() == 0 && factories.size() == 0)
            {
                try
                {
View Full Code Here

Examples of org.switchyard.common.type.classpath.ClasspathScanner

                : routeClass.getAnnotation(Route.class).name();
    }

    private List<Class<?>> scanForRoutes(List<URL> urls) throws IOException {
        AbstractTypeFilter filter = new RouteFilter();
        ClasspathScanner scanner = new ClasspathScanner(filter);

        for (URL url : urls) {
            scanner.scan(url);
        }

        return filter.getMatchedTypes();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.