I'm trying to find the types of the parameters of a method using the Java 6 metamodel API. If the type is an enum, I'd also like to know all of it's type's enum constant names. Here's what I've got so far:
for (Element member : members) {
if(member.getKind() == ElementKind.METHOD) {
ExecutableElement methodElement = (ExecutableElement) member;
List<? extends VariableElement> parameters = methodElement.getParameters();
for (VariableElement parameter : parameters) {
//How do I get the type of the parameter here?
}
}
}