Class<?> claz = obj.getClass();
/*
* first try for a getFoo() type of property (also getfoo() )
*/
AbstractExecutor executor = new PropertyExecutor(log, introspector, claz, identifier);
/*
* if that didn't work, look for boolean isFoo()
*/
if (!executor.isAlive()) {
executor = new BooleanPropertyExecutor(log, introspector, claz, identifier);
}
/*
* Let's see if we are a map...
*/
if (!executor.isAlive()) {
executor = new MapGetExecutor(log, claz, identifier);
}
/*
* finally, look for get("foo")
*/
if (!executor.isAlive()) {
executor = new GetExecutor(log, introspector, claz, identifier);
}
return executor.isAlive() ? new VelGetterImpl(executor) : null;
}