Package org.reflections

Examples of org.reflections.reflections$TestModel$Usage$C2$fields


public class StageScanner {
 
  public List<Class<?>> getClasses(List<URL> jars) {
    ClassLoader cl = new URLClassLoader(jars.toArray(new URL[jars.size()]));
   
    Reflections reflections = new Reflections(jars, cl);
    return getClasses(reflections);
  }
View Full Code Here


    return StringUtils.join(list, "\\\\ \\\\ ");
  }
 
  public static void main(String[] args) {
    StageScanner ss = new StageScanner();
    List<Class<?>> classes = ss.getClasses(new Reflections("com.findwise"));
    printWikiTable(classes);
  }
View Full Code Here

            }

            // Check if there are complements via annotations
            if (d.getPackagesToScan() != null) {
                for (String pack : d.getPackagesToScan()) {
                    Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(
                        ClasspathHelper.forPackage(pack)).setScanners(new MethodAnnotationsScanner()));

                    Set<Method> annotated = reflections.getMethodsAnnotatedWith(Documentation.class);

                    Iterator<Method> it = annotated.iterator();

                    while (it.hasNext()) {
                        Method m = it.next();
View Full Code Here

   * @param classLoader The ClassLoader containing classes to be reflected
   *            upon
   * @return The constructed Reflections object
   */
  public static Reflections getReflections(ClassLoader classLoader) {
    Reflections reflections = new Reflections(new ConfigurationBuilder().addClassLoader(classLoader)
      .setUrls(ClasspathHelper.forClassLoader(new ClassLoader[] { classLoader }))
      .setScanners(new TypeAnnotationsScanner()));
    return reflections;
  }
View Full Code Here

public class RequestUrlActivityMapperImpl implements RequestUrlActivityMapper
{
  public String getActivityClassNameFromUrl(String uri)
  {
    Reflections reflections= new Reflections("");
    Set<Class<? extends VisualActivity>> modules= reflections.getSubTypesOf(VisualActivity.class);
    Set<Class<?>> aliases= reflections.getTypesAnnotatedWith(PageAlias.class);

    for (Class<?> type : aliases)
    {
      PageAlias pageAlias= type.getAnnotation(PageAlias.class);
      if (pageAlias != null && uri.contains(pageAlias.alias()))
View Full Code Here

    return null;
  }

  public List<Class<? extends DragomeVisualActivity>> getExistingVisualActivities()
  {
    Reflections reflections= new Reflections("");
    Set<Class<? extends DragomeVisualActivity>> classes= reflections.getSubTypesOf(DragomeVisualActivity.class);
    return new ArrayList<Class<? extends DragomeVisualActivity>>(classes);
  }
View Full Code Here

public class ServerReflectionServiceImpl extends ReflectionServiceImpl
{
  public <T> Set<Class<? extends T>> getSubTypesOf(final Class<T> type)
  {
    Reflections reflections= new Reflections("");
    Set<Class<? extends T>> implementations= reflections.getSubTypesOf(type);
    return implementations;
  }
View Full Code Here

  public DragomeConfigurator getConfigurator()
  {
    try
    {
      DragomeConfigurator foundConfigurator= null;
      Reflections reflections= new Reflections("");
      Set<Class<? extends DragomeConfigurator>> configurators= reflections.getSubTypesOf(DragomeConfigurator.class);
      for (Class<? extends DragomeConfigurator> class1 : configurators)
        if (!class1.equals(DefaultDragomeConfigurator.class))
          foundConfigurator= class1.newInstance();

      if (foundConfigurator == null)
      {
        Set<Class<?>> typesAnnotatedWith= reflections.getTypesAnnotatedWith(DragomeConfiguratorImplementor.class);
        if (typesAnnotatedWith.isEmpty())
          foundConfigurator= new DefaultDragomeConfigurator();
        else
          foundConfigurator= (DragomeConfigurator) typesAnnotatedWith.iterator().next().newInstance();
      }
View Full Code Here

      ClassLoader classLoader = ComponentMojoUtil.getClassLoader(classpathElements, this.getClass()
        .getClassLoader());

      ClassPool classPool = ComponentMojoUtil.getClassPool(classLoader);

      Reflections reflections = ComponentMojoUtil.getReflections(classLoader);

      List<CtClass> classList = ComponentMojoUtil.getAllComponentAnnotations(classPool, reflections, getExcludedClasses());

      WidgetRegistry widgetRegistry = new DefaultWidgetRegistry(classPool, classLoader, reflections);
View Full Code Here

      if (excludedDependencyPaths != null) {
          ClassLoader exclusionClassLoader = ComponentMojoUtil.getClassLoader(excludedDependencyPaths, this
                .getClass().getClassLoader());

          Reflections reflections = ComponentMojoUtil.getReflections(exclusionClassLoader);

          Set<String> excludedClassNames = reflections.getStore().getTypesAnnotatedWith(Component.class.getName());

          return excludedClassNames;
      }

      return null;
View Full Code Here

TOP

Related Classes of org.reflections.reflections$TestModel$Usage$C2$fields

Copyright © 2018 www.massapicom. 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.