protected Collection<Field> getSessionFields(Class<?> clazz) {
        Collection<Field> fields = fieldMap.get(clazz);
        if (fields == null) {
            fields = ReflectUtil.getFields(clazz);
            Iterator<Field> iterator = fields.iterator();
            while (iterator.hasNext()) {
                Field field = iterator.next();
                if (!field.isAnnotationPresent(Session.class)) {
                    iterator.remove();
                }
            }
            fieldMap.put(clazz, fields);
        }
        return fields;
    }
protected Collection < Field > getSessionFields ( Class < ? > clazz ) { Collection < Field > fields = fieldMap . get ( clazz ) ; if ( fields == null ) { fields = ReflectUtil . getFields ( clazz ) ; Iterator < Field > iterator = fields . iterator ( ) ; while ( iterator . hasNext ( ) ) { Field field = iterator . next ( ) ; if ( ! field . isAnnotationPresent ( Session . class ) ) { iterator . remove ( ) ; } } fieldMap . put ( clazz , fields ) ; } return fields ; }
Returns all fields with Session annotation for a class.
@param clazz Class.
@return All fields with Session annotation for a class.