if (member instanceof Method) {
return new MethodAccess((Method) member);
} else if (member instanceof Field) {
return new FieldAccess((Field) member);
} else if (member instanceof Constructor<?>) {
return new ConstructorAccess((Constructor<?>) member);
} else {
return null; // class level
}
}