NIHVIVO-564 Exclude methods declared on BaseTemplateModel from describe directive display.
This commit is contained in:
parent
698d0877c3
commit
badfac1321
1 changed files with 4 additions and 3 deletions
|
@ -116,10 +116,11 @@ public class DescribeDirective extends BaseTemplateDirectiveModel {
|
|||
}
|
||||
|
||||
private List<Method> getPublicMethods(Class<?> cls) {
|
||||
List<Method> methods = new ArrayList<Method>();
|
||||
|
||||
List<Method> methods = getDeclaredPublicMethods(cls);
|
||||
// Don't get methods for classes higher in the class hierarchy than BaseTemplateModel.
|
||||
// Go up the class hierarchy only until we get to the immediate subclass of BaseTemplateModel
|
||||
if (! cls.getName().equals("edu.cornell.mannlib.vitro.webapp.web.templatemodels.BaseTemplateModel")) {
|
||||
methods = getDeclaredPublicMethods(cls);
|
||||
methods.addAll(getPublicMethods(cls.getSuperclass()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue