public static Method find(TypeDef clazz, Property property, boolean acceptPrefixless) {
        TypeDef current = clazz;
        while (current!= null && !current.equals(TypeDef.OBJECT)) {
            //1st pass strict
            for (Method method : current.getMethods()) {
                if (isApplicable(method, property, true, false)) {
                    return method;
                }
            }
            //2nd pass relaxed
            for (Method method : current.getMethods()) {
                if (isApplicable(method, property, false, false)) {
                    return method;
                }
            }

            //3nd pass more relaxed
            if (acceptPrefixless) {
                for (Method method : current.getMethods()) {
                    if (isApplicable(method, property, false, true)) {
                        return method;
                    }
                }
            }
            if (!current.getExtendsList().iterator().hasNext()) {
                break;
            }
            String fqn = current.getExtendsList().iterator().next().getDefinition().getFullyQualifiedName();
            current = DefinitionRepository.getRepository().getDefinition(fqn);
        }
        throw new SundrException("No getter found for property: " + property.getName() + " on class: " + clazz.getFullyQualifiedName());
    }
public static Method find ( TypeDef clazz , Property property , boolean acceptPrefixless ) { TypeDef current = clazz ; while ( current != null && ! current . equals ( TypeDef . OBJECT ) ) { for ( Method method : current . getMethods ( ) ) { if ( isApplicable ( method , property , true , false ) ) { return method ; } } for ( Method method : current . getMethods ( ) ) { if ( isApplicable ( method , property , false , false ) ) { return method ; } } if ( acceptPrefixless ) { for ( Method method : current . getMethods ( ) ) { if ( isApplicable ( method , property , false , true ) ) { return method ; } } } if ( ! current . getExtendsList ( ) . iterator ( ) . hasNext ( ) ) { break ; } String fqn = current . getExtendsList ( ) . iterator ( ) . next ( ) . getDefinition ( ) . getFullyQualifiedName ( ) ; current = DefinitionRepository . getRepository ( ) . getDefinition ( fqn ) ; } throw new SundrException ( "No getter found for property: " + property . getName ( ) + " on class: " + clazz . getFullyQualifiedName ( ) ) ; }
Find the getter of the specified property in the type.
@param clazz                 The class.
@param property              The property.
@param acceptPrefixless      Flag to accept prefixless getters.
@return                      The getter method if found. Throws exception if no getter is matched.