in velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ClassTool.java [489:524]
public Set<Class> getTypes()
{
Set<Class> types = new HashSet<Class>();
for (MethodSub method : getMethods())
{
if (!isSafeMode() || method.isPublic())
{
if (!method.isVoid())
{
addType(types, method.getReturns());
}
for (Class type : method.getParameters())
{
addType(types, type);
}
}
}
for (ConstructorSub constructor : getConstructors())
{
if (!isSafeMode() || constructor.isPublic())
{
for (Class type : constructor.getParameters())
{
addType(types, type);
}
}
}
for (FieldSub field : getFields())
{
if (!isSafeMode() || field.isPublic())
{
addType(types, field.getType());
}
}
return types;
}