INFOMAS ASL contains all open sourced code from the INFOMAS PCM Application Suite. All code is licensed by the Apache License, Version 2.0, so it can be used by both open source and commercial projects.
The INFOMAS PCM Application Suite is a commercial Product Content Management (also known as PIM, Product Information Management) Application. For more information, visit http://www.xiam.nl.
- Language: Java 6 SE or better
- Tested with both Oracle JDK 6 and 7 and OpenJDK 6 and 7 (Last three VM's using Travis CI Server)
- Build System: Maven 3
- Apache License, Version 2.0
- Maven Artifacts are available from Central Maven
Currently INFOMAS ASL contains the following modules:
- annotation-detector
- More to come ...
This library can be used to scan (part of) the class path for annotated classes, methods or instance variables. Main advantages of this library compared with similar solutions are: light weight (no dependencies, simple API, 16 kb jar file) and very fast (fastest annotation detection library as far as I know).
<dependency>
<groupId>eu.infomas</groupId>
<artifactId>annotation-detector</artifactId>
<version>3.0.2</version>
</dependency>Put the annotation-detector-{version}.jar in the class path. No other dependencies are required!
You can either scan the complete class path or only scan specified packages (see JavaDoc for more details).
// Scan all .class files on the class path
// Report all .class files, with org.junit.Test annotated methods
final MethodReporter reporter = new MethodReporter() {
@SuppressWarnings("unchecked")
@Override
public Class<? extends Annotation>[] annotations() {
return new Class[]{Test.class};
}
@Override
public void reportMethodAnnotation(Class<? extends Annotation> annotation,
String className, String methodName) {
// do something
}
};
final AnnotationDetector cf = new AnnotationDetector(reporter);
cf.detect();That's all!
Copyright (c) 2011 - 2012 XIAM Solutions B.V.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

