How to found which class or method contain specific annotation?

How to found which class or method contain specific annotation?

Suppose we are having a class with separate user define annoation in same package like

@One

class A {

}

@Two

class B {

}

@One

class C {

}

How will I find which class is using @one annotation and which @Two?

OR

We are having a class in which methods are annotated and i want to retrieve which annotation is having which annotation

like :

class A {

@two

public method1() {

}

@one

public method2() {

}

@two

public method3() {

}

}

Any other idea to do something like this will be appreciated. Any help will be appreciated I am using core java reflection and annotations.

Original Scenario:-

Suppose i am having a class testcases having GUI ,Functional and others these three categories of testcase. i want to found method or class according to category and execute that method or class which ever is possible.

View Answers









Related Tutorials/Questions & Answers:
How to found which class or method contain specific annotation?
Example for a method in java which returns a class
Advertisements
class not found exception
How do I resolve this Java Class not found exception?
class not found error - JDBC
com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found
CLASS NOT FOUND EXCEPTION
unable to import class com.opensymphony.xwork2.ActionContext not found
Error:No Class Found Exception:org.postgresql.driver
How to call the run method from another class?
JSP error: class UserForm not found in class model.UserAction
class method in java
Java Abstract Class Example
Which method is more efficient?
Getting Fields Information of a class
Class and method question, Java?
java profram:error 405 method not found
which class is super class to all classes
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?
How to remove specific element from Hashset.
Abstract class and abstract method
javascript call action class method instruts
Java class method - Java Beginners
Which class is extended by all other classes?
JavaScript insertData method
JDBC Class Not Found Exception
Method which returns area of circle - Java Beginners
If Sessin Contain Array how can i get each value.
Java toUpperCase() Method
JavaScript lastIndexOf method
Calling java class method from javascript
How to extract the entire line with specific data from a Text in java?
how to call static method
how to call static method
how to call static method
Java class in JSP
Use of putChar() method of ByteBuffer class.
how to call static method
how to call static method
how to call static method
Use of toString() method of FloatBuffer class.
Example of skip() method of CheckedInputStream class.
ShortBuffer in java, Use of isDirect() method of ShortBuffer class in java.
ShortBuffer in java, Use of equals() method of ShortBuffer class in java.
Use of rewind() method of FloatBuffer class.
How will you load a specific locale? - Java Beginners
Formatting and Parsing Locale-Specific Currency
How to use charAt() method in Java?
Use of getInt() method of ByteBuffer class in java.
Formatting and Parsing a Locale-Specific Percentage

Ads