It already exists:
| /**
| * Is the metadata present
| *
| * @param name the name of the meta data
| * @return true when the metadata is present
| */
| boolean isMetaDataPresent(String name);
|
If you're not going to check whether the name is really an annotation class
then they are the same thing.
Of course, you might want to implement it like this, just to make doubly sure :-)
| public boolean isAnnotationPresent(String name)
| {
| Object test = getMetaData(name);
| return test != null && (test instanceof Annotation);
| }
|
But such a non-annotation using the name of annotation class would break
the assumption of how the annotation stuff works in the metadata. :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129078#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...