org.databene.benerator.anno
Class AnnotationMapper
java.lang.Object
org.databene.model.data.DefaultDescriptorProvider
org.databene.benerator.anno.AnnotationMapper
- All Implemented Interfaces:
- DescriptorProvider
public class AnnotationMapper
- extends DefaultDescriptorProvider
Maps Java annotations to descriptor objects.
Created: 29.04.2010 06:59:02
- Since:
- 0.6.1
- Author:
- Volker Bergmann
Method Summary |
protected boolean |
applyGeneratorFactory(java.lang.annotation.Annotation[] annotations,
BeneratorContext context)
|
protected void |
applyMethodDefaultsProvider(java.lang.reflect.Method testMethod,
BeneratorContext context)
|
protected void |
applyMethodGeneratorFactory(java.lang.reflect.Method testMethod,
BeneratorContext context)
|
Generator<?> |
createAndInitAttributeGenerator(java.lang.reflect.Field attribute,
BeneratorContext context)
scans test class attributes for attributes with @Source annotation
and initializes them with a value from the referred source object |
Generator<java.lang.Object[]> |
createAndInitMethodParamsGenerator(java.lang.reflect.Method testMethod,
BeneratorContext context)
|
protected Generator<java.lang.Object[]> |
createGenerator(ArrayTypeDescriptor type,
java.lang.reflect.Method testMethod,
Uniqueness uniqueness,
BeneratorContext context)
|
protected InstanceDescriptor |
createMethodParamsInstanceDescriptor(java.lang.reflect.Method testMethod,
ArrayTypeDescriptor type)
|
protected ArrayTypeDescriptor |
createMethodParamsType(java.lang.reflect.Method testMethod)
|
protected ArrayTypeDescriptor |
createNativeParamsDescriptor(java.lang.reflect.Method testMethod)
|
protected TypeDescriptor |
createTypeDescriptor(java.lang.Class<?> type)
|
protected static boolean |
explicitlyMappedAnnotation(java.lang.annotation.Annotation annotation)
|
void |
parseClassAnnotations(java.lang.annotation.Annotation[] annotations,
BeneratorContext context)
Parses @Database and @Bean annotations attached to a class,
initializes the related objects and puts them into the BeneratorContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AnnotationMapper
public AnnotationMapper(DataModel dataModel,
PathResolver pathResolver)
parseClassAnnotations
public void parseClassAnnotations(java.lang.annotation.Annotation[] annotations,
BeneratorContext context)
- Parses @
Database
and @Bean
annotations attached to a class,
initializes the related objects and puts them into the BeneratorContext
createAndInitAttributeGenerator
public Generator<?> createAndInitAttributeGenerator(java.lang.reflect.Field attribute,
BeneratorContext context)
- scans test class attributes for attributes with @
Source
annotation
and initializes them with a value from the referred source object
createAndInitMethodParamsGenerator
public Generator<java.lang.Object[]> createAndInitMethodParamsGenerator(java.lang.reflect.Method testMethod,
BeneratorContext context)
createMethodParamsType
protected ArrayTypeDescriptor createMethodParamsType(java.lang.reflect.Method testMethod)
createMethodParamsInstanceDescriptor
protected InstanceDescriptor createMethodParamsInstanceDescriptor(java.lang.reflect.Method testMethod,
ArrayTypeDescriptor type)
createNativeParamsDescriptor
protected ArrayTypeDescriptor createNativeParamsDescriptor(java.lang.reflect.Method testMethod)
explicitlyMappedAnnotation
protected static boolean explicitlyMappedAnnotation(java.lang.annotation.Annotation annotation)
applyMethodGeneratorFactory
protected void applyMethodGeneratorFactory(java.lang.reflect.Method testMethod,
BeneratorContext context)
applyGeneratorFactory
protected boolean applyGeneratorFactory(java.lang.annotation.Annotation[] annotations,
BeneratorContext context)
applyMethodDefaultsProvider
protected void applyMethodDefaultsProvider(java.lang.reflect.Method testMethod,
BeneratorContext context)
createGenerator
protected Generator<java.lang.Object[]> createGenerator(ArrayTypeDescriptor type,
java.lang.reflect.Method testMethod,
Uniqueness uniqueness,
BeneratorContext context)
createTypeDescriptor
protected TypeDescriptor createTypeDescriptor(java.lang.Class<?> type)
Copyright © 2013. All Rights Reserved.