Skip to content

Instantly share code, notes, and snippets.

@cbeams
Created April 28, 2011 14:49
Show Gist options
  • Select an option

  • Save cbeams/946492 to your computer and use it in GitHub Desktop.

Select an option

Save cbeams/946492 to your computer and use it in GitHub Desktop.
@Meta
@Component(value="local")
static class Simple {
}
@Component(value="meta")
@Retention(RetentionPolicy.RUNTIME)
@interface Meta {
}
@Test
public void simple() throws IOException {
Map<String, Object> annotationAttributes =
new SimpleMetadataReaderFactory()
.getMetadataReader(Simple.class.getName())
.getAnnotationMetadata()
.getAnnotationAttributes(Component.class.getName(), true);
assertEquals("local", annotationAttributes.get("value"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment