/**
 *
 * Copyright (c) 2006-2016, Speedment, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); You may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.speedment.runtime.field.method;

/**
 *
 * @param  <ENTITY>  the entity type
 * 
 * @author  Emil Forslund
 * @since   3.0.0
 */
public interface Getter<ENTITY> {
    
    /**
     * A generic (untyped) get method.
     * 
     * @param entity  the entity to get from
     * @return        the value
     */
    Object apply(ENTITY entity);
    
}
@@ -669,16 +669,53 @@
 ethod;%0A%0A
+import java.util.function.Function;%0A%0A
 /**%0A *%0A 
@@ -1019,9 +1019,225 @@
 );%0A    %0A
+    /**%0A     * Returns this object, typed as a %7B@code Function%7D method.%0A     * %0A     * @return  this object as a function%0A     */%0A    default Function%3CENTITY, Object%3E asFunction() %7B%0A        return this::apply;%0A    %7D%0A
 %7D

Make it possible to convert a getter into a function