public <Solution> Collection<Objective<Solution, ?>> createFromGetters(
			Class<Solution> solutionClass) {
		Collection<Objective<Solution, ?>> objectives = new LinkedList<>();
		for (Method method : solutionClass.getMethods()) {
			if (method.getParameterTypes().length == 0
					&& method.getReturnType() != null
					&& !method.getName().equals("getClass")
					&& method.getName().matches("get[^a-z].*")) {
				String name = method.getName().substring(3);
				objectives.add(createObjectiveOn(solutionClass, method, name,
						method.getReturnType()));
			} else {
				// not a getter, ignore it
			}
		}
		return objectives;
	}
public < Solution > Collection < Objective < Solution , ? > > createFromGetters ( Class < Solution > solutionClass ) { Collection < Objective < Solution , ? > > objectives = new LinkedList < > ( ) ; for ( Method method : solutionClass . getMethods ( ) ) { if ( method . getParameterTypes ( ) . length == 0 && method . getReturnType ( ) != null && ! method . getName ( ) . equals ( "getClass" ) && method . getName ( ) . matches ( "get[^a-z].*" ) ) { String name = method . getName ( ) . substring ( 3 ) ; objectives . add ( createObjectiveOn ( solutionClass , method , name , method . getReturnType ( ) ) ) ; } else { } } return objectives ; }
This method retrieves all the values accessible through a getter (
<code>getX()</code> method) in order to build the corresponding set of
{@link Objective}s. Notice that {@link Objective}s are supposed to
represent evaluations of a {@link Solution}, so if the {@link Solution}
has other kinds of information accessible through getters, they will also
be retrieved as {@link Objective}s. In such a case, you should filter the
returned {@link Objective}s, rely on more advanced methods, or generate
the {@link Objective}s manually.

@param solutionClass
the {@link Solution} class to analyze
@return the set of {@link Objective}s retrieved from this class
@see #createFromLonelyGetters(Class)