java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java
branchv_0
changeset 220 0bc544b38cfa
parent 216 0eb9aec16bf4
child 229 7699133f5a01
     1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Sat Aug 15 16:15:30 2015 +0200
     1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Sun Aug 16 01:25:01 2015 +0200
     1.3 @@ -188,17 +188,6 @@
     1.4  		}
     1.5  	}
     1.6  
     1.7 -	private PropertyDeclaration[] getPropertyDeclarations(Class<? extends Formatter> formatterClass) {
     1.8 -		PropertyDeclarations properties = formatterClass.getAnnotation(PropertyDeclarations.class);
     1.9 -
    1.10 -		if (properties == null) {
    1.11 -			PropertyDeclaration p = formatterClass.getAnnotation(PropertyDeclaration.class);
    1.12 -			return p == null ? new PropertyDeclaration[]{} : new PropertyDeclaration[]{p};
    1.13 -		} else {
    1.14 -			return properties.value();
    1.15 -		}
    1.16 -	}
    1.17 -
    1.18  	private void listFormatterProperties(String formatterName) throws FormatterException, ConfigurationException {
    1.19  		FormatterDefinition fd = configurationProvider.getConfiguration().getFormatter(formatterName);
    1.20  		try {
    1.21 @@ -223,7 +212,7 @@
    1.22  			List<Class<? extends Formatter>> hierarchy = Functions.getClassHierarchy(formatterClass, Formatter.class);
    1.23  			Collections.reverse(hierarchy);
    1.24  			hierarchy.stream().forEach((c) -> {
    1.25 -				for (PropertyDeclaration p : getPropertyDeclarations(c)) {
    1.26 +				for (PropertyDeclaration p : Functions.getPropertyDeclarations(c)) {
    1.27  					data.put(p.name(), propertyDeclarationToRow(p, c, printDeclaredIn));
    1.28  				}
    1.29  			});