<editor-fold desc="Getters">
976152
public function getGetterCodeDocumentationLines(JavaAttribute $attribute)
    {
        $lines = [];

        $lines[] = 'Get ' . $attribute->getLowerFullName();
        $lines[] = '';
        $lines[] = '@return ' . ('object' === $attribute->getType() ? $attribute->getEntitySubtype()->getName() : $attribute->getType());

        return $lines;
    }
1128575
@SuppressWarnings("unchecked")
    @Override
    public synchronized <T> Evaluator<T> createEvaluator(String source, ClassType projection, String[] names,
            Type[] types, Class<?>[] classes, Map<String, Object> constants) {
        try {
            final String id = toId(source, projection.getJavaClass(), types, constants.values());
            Method method = cache.get(id);
                        
            if (method == null) {
                Class<?> clazz;
                try {
                    clazz = loader.loadClass(id);
                } catch (ClassNotFoundException e) {
                    compile(source, projection, names, types, id, constants);
                    // reload
                    clazz = loader.loadClass(id);
                }
                method = findEvalMethod(clazz);
                cache.put(id, method);
            }
            
            return new MethodEvaluator<T>(method, constants, (Class) projection.getJavaClass());
        } catch (ClassNotFoundException e) {
            throw new CodegenException(e);
        } catch (SecurityException e) {
            throw new CodegenException(e);
        } catch (IOException e) {
            throw new CodegenException(e);
        }
    }
37121
String getAttributeName(Method getter) {
        String attributeName;
        readLockAttrName.lock();
        try {
            attributeName = attributeNameCache.get(getter);
        } finally {
            readLockAttrName.unlock();
        }
        if ( attributeName != null )
            return attributeName;
        DynamoDBHashKey hashKeyAnnotation = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBHashKey.class);
        if ( hashKeyAnnotation != null ) {
            attributeName = hashKeyAnnotation.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBIndexHashKey indexHashKey = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBIndexHashKey.class);
        if ( indexHashKey != null ) {
            attributeName = indexHashKey.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBRangeKey rangeKey = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBRangeKey.class);
        if ( rangeKey != null ) {
            attributeName = rangeKey.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBIndexRangeKey indexRangeKey = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBIndexRangeKey.class);
        if ( indexRangeKey != null ) {
            attributeName = indexRangeKey.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBAttribute attribute = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBAttribute.class);
        if ( attribute != null ) {
            attributeName = attribute.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBVersionAttribute version = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBVersionAttribute.class);
        if ( version != null ) {
            attributeName = version.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        // Default to the camel-cased field name of the getter method, inferred
        // according to the Java naming convention.
        attributeName = ReflectionUtils.getFieldNameByGetter(getter, true);
        return cacheAttributeName(getter, attributeName);
    }
457319
Optional<ExecutableElement> findGetterMethodFor(Element field) {
        String getterName = getterNameFor(field);
        // FIXME refine this to discover one of possible overloaded methods with correct signature (i.e. single arg of field type)
        TypeElement typeElement = classElementFor(field);
        if (typeElement == null) {
            return Optional.empty();
        }

        List<? extends Element> elements = typeElement.getEnclosedElements();
        List<ExecutableElement> methods = ElementFilter.methodsIn(elements);
        return methods.stream()
                .filter(method -> {
                    String methodName = method.getSimpleName().toString();
                    if (getterName.equals(methodName)) {
                        Set<Modifier> modifiers = method.getModifiers();
                        return
                                // it's not static
                                !modifiers.contains(STATIC)
                                        // it's either public or package visibility
                                        && modifiers.contains(PUBLIC)
                                        || !(modifiers.contains(PRIVATE) || modifiers.contains(PROTECTED));
                    }
                    return false;
                })
                .findFirst();
    }
214541
static final <T> FieldMap<T> of(Method getter, String defaultName) {
        final Class<T> targetType = (Class<T>)getter.getReturnType();
        final String fieldName = StandardBeanProperties.fieldNameOf(getter);

        Field declaredField = null;
        try {
            declaredField = getter.getDeclaringClass().getDeclaredField(fieldName);
        } catch (final SecurityException e) {
            throw new DynamoDBMappingException("no access to field for " + getter, e);
        } catch (final NoSuchFieldException no) {}

        if (defaultName == null) {
            defaultName = fieldName;
        }

        final FieldMap<T> annotations = new FieldMap<T>(targetType, defaultName);
        annotations.putAll(targetType);
        annotations.putAll(declaredField);
        annotations.putAll(getter);
        return annotations;
    }
488104
public static Method getGetterMethod(Class<?> c, String field) {

        try {
            return c.getMethod(getMethodName(field, GET_METHOD_PREFIX), EMPTY_CLASS);
        } catch (NoSuchMethodException e) {
            try {
                return c.getMethod(getMethodName(field, IS_METHOD_PREFIX), EMPTY_CLASS);
            } catch (NoSuchMethodException e1) {
                //log.info("getter method not found : " + field);
                return null;
            }
        }
    }
1223064
private static <T> Method getGetter(Class<T> clazz, Field f){
		String getterName = "get" + StringUtils.capitalize(f.getName());
		Method getter = null;
		try {
			getter = clazz.getMethod(getterName);
		} catch (Exception e) {
			logger.debug(getterName + " doesn't exist!",e);
		}
		return getter;
	}
1148081
@Override
    public Object getE(int intKey) throws PageException {
	Iterator it = valueIterator();// getMap().keySet().iterator();
	int count = 0;
	Object o;
	while (it.hasNext()) {
	    o = it.next();
	    if ((++count) == intKey) {
		return o;// super.get(o.toString());
	    }
	}
	throw new ExpressionException("invalid index [" + intKey + "] for argument scope");
    }
336217
void writeBindingGetter(Key<?> key, Binding binding, GinScope scope,
      List<InjectorMethod> helperMethodsOutput) {
    Context bindingContext = binding.getContext();

    SourceSnippetBuilder getterBuilder = new SourceSnippetBuilder();
    SourceSnippet creationStatements;
    String getter = nameGenerator.getGetterMethodName(key);

    String typeName;
    try {
      typeName = ReflectUtil.getSourceName(key.getTypeLiteral());

      creationStatements = binding.getCreationStatements(nameGenerator, helperMethodsOutput);
    } catch (NoSourceNameException e) {
      errorManager.logError("Error trying to write getter for [%s] -> [%s];"
          + " binding declaration: %s", e, key, binding, bindingContext);
      return;
    }

    // Name of the field that we might need.
    String field = nameGenerator.getSingletonFieldName(key);

    switch (scope) {
      case EAGER_SINGLETON:
        initializeEagerSingletonsBody.append("// Eager singleton bound at:\n");
        appendBindingContextCommentToMethod(bindingContext, initializeEagerSingletonsBody);
        initializeEagerSingletonsBody.append(getter).append("();\n");
        // !break
        //CHECKSTYLE_OFF
      case SINGLETON:
        //CHECKSTYLE_OFF
        writer.println("private " + typeName + " " + field + " = null;");
        writer.println();
        getterBuilder.append(String.format("\nif (%s == null) {\n", field))
            .append(creationStatements).append("\n")
            .append(String.format("    %s = result;\n", field))
            .append("}\n")
            .append(String.format("return %s;\n", field));
        break;

      case NO_SCOPE:
        sourceWriteUtil.writeBindingContextJavadoc(writer, bindingContext, key);

        getterBuilder.append(creationStatements).append("\n").append("return result;\n");
        break;

      default:
        throw new IllegalStateException();
    }

    outputMethod(SourceSnippets.asMethod(false, String.format("public %s %s()", typeName, getter),
        fragmentPackageName.toString(), getterBuilder.build()));
  }
156671
function shallowValueGetter(obj, fieldName) {
    if (obj == null)
        return '';
    if (!obj || !fieldName)
        return obj;
    var value = obj[fieldName];
    if (value == null)
        return '';
    return value;
}
549685
function(proto, key, def) {
		var desc;
		["getter", "setter"].forEach(function(name, set) {
			while (proto && proto[key] && !gui.Type.isDefined(def[name])) {
				proto = Object.getPrototypeOf(proto);
				desc = Object.getOwnPropertyDescriptor(proto, key);
				if (desc) {
					def[name] = desc[set ? "set" : "get"];
				}
			}
		});
		return {
			enumerable: true,
			configurable: true,
			get: def.getter || this._NOGETTER,
			set: def.setter || this._NOSETTER
		};
	}
510616
def get(self, obj, **kwargs):
        
        assert self.getter is not None, "Getter accessor is not specified."
        if callable(self.getter):
            return self.getter(obj, **_get_context(self._getter_argspec, kwargs))

        assert isinstance(self.getter, string_types), "Accessor must be a function or a dot-separated string."

        for attr in self.getter.split("."):
            if isinstance(obj, dict):
                obj = obj[attr]
            else:
                obj = getattr(obj, attr)

        if callable(obj):
            return obj()

        return obj
919602
private static BiFunction<AnnotatedValueResolver, ResolverContext, Object>
    resolver(Function<ResolverContext, List<String>> getter, Supplier<String> failureMessageSupplier) {
        return (resolver, ctx) -> {
            final List<String> values = getter.apply(ctx);
            if (!resolver.hasContainer()) {
                if (values != null && !values.isEmpty()) {
                    return resolver.convert(values.get(0));
                }
                return resolver.defaultOrException();
            }

            try {
                assert resolver.containerType() != null;
                @SuppressWarnings("unchecked")
                final Collection<Object> resolvedValues =
                        (Collection<Object>) resolver.containerType().getDeclaredConstructor().newInstance();

                // Do not convert value here because the element type is String.
                if (values != null && !values.isEmpty()) {
                    values.stream().map(resolver::convert).forEach(resolvedValues::add);
                } else {
                    final Object defaultValue = resolver.defaultOrException();
                    if (defaultValue != null) {
                        resolvedValues.add(defaultValue);
                    }
                }
                return resolvedValues;
            } catch (Throwable cause) {
                throw new IllegalArgumentException(failureMessageSupplier.get(), cause);
            }
        };
    }
271165
function MapIterator(keys, valueGetter) {
    this._keys = keys;
    this._valueGetter = valueGetter;
    this._length = this._keys.length;
    this._index = -1;
    this._done = false;
}
1219786
function useStateWithGetter(initial) {
  const ref = useRef();
  const [state, setState] = useState(initial);
  ref.current = state;
  const set = (value) => {
    ref.current = value;
    setState(value);
  };
  const get = () => {
    return ref.current;
  };
  return [state, set, get];
}
537086
final void checkReturnType(TypeElement autoValueClass, ExecutableElement getter) {
    TypeMirror type = getter.getReturnType();
    if (type.getKind() == TypeKind.ARRAY) {
      TypeMirror componentType = ((ArrayType) type).getComponentType();
      if (componentType.getKind().isPrimitive()) {
        warnAboutPrimitiveArrays(autoValueClass, getter);
      } else {
        errorReporter.reportError(
            "An @"
                + simpleAnnotationName
                + " class cannot define an array-valued property unless it is a primitive array",
            getter);
      }
    }
  }
1128784
@SuppressWarnings("unchecked")
    @SafeVarargs
    public final <T> T gett(final Connection conn, final String sql, final StatementSetter statementSetter,
            final JdbcUtil.RecordGetter<T, RuntimeException> recordGetter, JdbcSettings jdbcSettings, final Object... parameters) {
        N.checkArgNotNull(recordGetter, "recordGetter");

        final ResultExtractor<T> resultExtractor = new ResultExtractor<T>() {
            @Override
            public T extractData(ResultSet rs, final JdbcSettings jdbcSettings) throws SQLException {
                int offset = jdbcSettings.getOffset();

                if (offset > 0) {
                    JdbcUtil.skip(rs, offset);
                }

                T result = null;

                if (rs.next()) {
                    result = Objects.requireNonNull(recordGetter.apply(rs));

                    if (rs.next()) {
                        throw new DuplicatedResultException("More than one records found by sql: " + sql);
                    }
                }

                return result;
            }
        };

        return query(conn, sql, statementSetter, resultExtractor, jdbcSettings, parameters);
    }