hibernate / hibernate-models

An abstraction over "reflection" and annotations
Apache License 2.0
2 stars 5 forks source link

Assert annotation is legal when adding to target #58

Closed sebersole closed 2 months ago

sebersole commented 2 months ago

Add simple assert -

@Override
public <X extends Annotation> void addAnnotationUsage(AnnotationUsage<X> annotationUsage) {
    assert annotationUsage.getAnnotationDescriptor().getAllowableTargets().contains( getKind() );
    ...
}