org.fudgemsg
Class ClasspathUtilities

java.lang.Object
  extended by org.fudgemsg.ClasspathUtilities

public final class ClasspathUtilities
extends Object

A collection of utilities for automatically populating Fudge contexts based on classpath scanning.


Field Summary
static String ANNOTATION_CACHE_PATH_PROPERTY
          The property used to specify where the path annotations should be cached to avoid costly scanning.
 
Method Summary
static org.scannotation.AnnotationDB getAnnotationDB()
          Obtain a database of annotations suitable for autoconfiguring Fudge based on the current classpath.
static Set<String> getClassNamesWithAnnotation(Class<? extends Annotation> annotationClass)
          Returns a set of classes with the declared annotation, using a cache file on disk if one is available.
static URL[] getClassPathElements()
          Determine URLs for all elements in the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANNOTATION_CACHE_PATH_PROPERTY

public static final String ANNOTATION_CACHE_PATH_PROPERTY
The property used to specify where the path annotations should be cached to avoid costly scanning.

See Also:
Constant Field Values
Method Detail

getAnnotationDB

public static org.scannotation.AnnotationDB getAnnotationDB()
Obtain a database of annotations suitable for autoconfiguring Fudge based on the current classpath.

Returns:
A database of all annotations.

getClassPathElements

public static URL[] getClassPathElements()
Determine URLs for all elements in the classpath.

Returns:
URLs for all elements in the classpath.

getClassNamesWithAnnotation

public static Set<String> getClassNamesWithAnnotation(Class<? extends Annotation> annotationClass)
Returns a set of classes with the declared annotation, using a cache file on disk if one is available.

Parameters:
annotationClass - annotation to search for
Returns:
the set of class names


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0