Calls the given method by name on the given view, assuming that it's a getter,
i.e., it doesn't have arguments.
@return the result of the method call
@throws AttributeAccessException when the method doesn't exist or can't be
called for various reasons
424185
public static Object callGetter(View view, String methodName) {
        try {
            Method method = view.getClass().getMethod(methodName);
            return method.invoke(view);
        } catch (SecurityException ex) {
            throw new AttributeAccessException(ex);
        } catch (NoSuchMethodException ex) {
            throw new AttributeAccessException("No such attribute", ex);
        } catch (IllegalAccessException ex) {
            throw new AttributeAccessException(ex);
        } catch (InvocationTargetException ex) {
            throw new AttributeAccessException(ex);
        }
    }
719326
@Override
  public MethodVisitor visitMethod(int access, String name, String desc,
                                   String signature, String[] exceptions) {
    MethodVisitor mv = cv.visitMethod(access | Opcodes.ACC_SYNTHETIC,
                                      name, desc, signature, exceptions);
    return new AccessMethodAdapter(mv);
  }
785293
@Override
    public Object getAttribute(String name) {
        if (name.startsWith(IPortletRenderer.RENDERER_ATTRIBUTE_PREFIX)) {
            return null;
        }

        final Object attribute = this.attributes.get(name);
        if (attribute != null) {
            return attribute;
        }

        if (name.startsWith(AbstractHttpServletRequestWrapper.PORTAL_ATTRIBUTE_PREFIX)) {
            Object result = this.servletRequest.getAttribute(name);
            return result;
        }

        if (name.equals(PortletRequest.RENDER_PART)) {
            Object result = this.servletRequest.getAttribute(name);
            return result;
        }

        return this.requestAttributeService.getAttribute(
                this.servletRequest, portletWindow.getPlutoPortletWindow(), name);
    }
910039
@SuppressFBWarnings("RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORE")
    public static Attribute get(final String _name)
        throws CacheReloadException
    {
        final Cache<String, Attribute> cache = InfinispanCache.get().<String, Attribute>getCache(Attribute.NAMECACHE);
        if (!cache.containsKey(_name)) {
            final String[] nameParts = _name.split("/");
            if (nameParts != null && nameParts.length == 2) {
                Type.get(nameParts[0]);
            }
        }
        return cache.get(_name);
    }
870048
def method_missing(name, *args, &block)
      getter_name = name[0..-2]

      if name =~ /^[a-z]+=$/ && !respond_to?(getter_name)
        define_accessor(getter_name, args.first)
      else
        super
      end
    end
1042647
@Override
    public Object getAttribute(String arg0) {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getAttribute(arg0);
        } finally {
            collaborator.postInvoke();
        }
    }
1337305
def method_caller(method_name, *args, **kwargs):
	
	def call_method(target):
		func = getattr(target, method_name)
		return func(*args, **kwargs)
	return call_method
141900
static <T> T getAnnotationAttribute(ModelWithAnnotation model, Class<? extends Annotation> annotation, AnnotationAttributeType attribute, T defaultValue,
			OnAnnotationAttributeListener<T> listener) {
		String attributeResult;

		ModelAnnotation item = model.getAnnotation(annotation);
		if (item != null) {
			attributeResult = item.getAttribute(attribute);

			return listener.onFound(attributeResult);
		}

		return defaultValue;
	}
1072451
def method_missing(method, *args)
      attr_name, suffix = method.to_s.scan(/([a-z0-9\_]+)(\?|\=)?$/i).first
      if suffix == ATTR_SETTER
        @_metaclass.send(:attr_accessor, attr_name)
        @_fields << attr_name.to_sym
        send(method, args.first)
      elsif attr_name && @_fields.include?(attr_name.to_sym)
        value = @attrs[attr_name.to_sym]
        case suffix
        when nil
          @_metaclass.send(:attr_accessor, attr_name)
          value
        when ATTR_PREDICATE then !!value
        end
      elsif suffix.nil? && SPECIAL_METHODS.include?(attr_name)
        instance_variable_get "@_#{attr_name}"
      elsif attr_name && !@_fields.include?(attr_name.to_sym)
        nil
      else
        super
      end
    end
505913
public static Object invokeAccessibly(Object instance, Method method, Object[] parameters) {
      return SecurityActions.invokeAccessibly(instance, method, parameters);
   }
884189
def method_missing(name, *args)
      attr = name.to_s.sub("=", "")
      return super unless attributes.has_key?(attr)
      if name.to_s.ends_with?("=")
        write_attribute(attr, *args)
      else
        read_attribute(attr)
      end
    end
415361
protected static void lookupMethodResource(javax.naming.Context context,
            Object instance, Method method, String name)
            throws NamingException, IllegalAccessException, InvocationTargetException
    {

        if (!method.getName().startsWith("set")
                || method.getParameterTypes().length != 1
                || !method.getReturnType().getName().equals("void"))
        {
            throw new IllegalArgumentException("Invalid method resource injection annotation");
        }

        Object lookedupResource;

        if ((name != null) && (name.length() > 0))
        {
            // TODO local or global JNDI
            lookedupResource = context.lookup(JAVA_COMP_ENV + name);
        }
        else
        {
            // TODO local or global JNDI
            lookedupResource =
                    context.lookup(JAVA_COMP_ENV + instance.getClass().getName() + "/" + getFieldName(method));
        }

        boolean accessibility = method.isAccessible();
        method.setAccessible(true);
        method.invoke(instance, lookedupResource);
        method.setAccessible(accessibility);
    }
925755
function(ev) {
                    // The attribute value, representing the name of the method to call (i.e. can-submit="foo" foo is the 
                    // name of the method)
                    var attr = removeCurly(el.getAttribute(attributeName)),
                        scopeData = data.scope.read(attr, {
                                returnObserveMethods: true,
                                isArgument: true
                            });
                    return scopeData.value.call(scopeData.parent, data.scope._context, can.$(this), ev);
                }
497053
public GetContactAttributesResult withAttributes(java.util.Map<String, String> attributes) {
        setAttributes(attributes);
        return this;
    }
18134
public Object get(String name) throws IOException {
        if (name.equalsIgnoreCase(IS_CA)) {
            return (Boolean.valueOf(ca));
        } else if (name.equalsIgnoreCase(PATH_LEN)) {
            return (Integer.valueOf(pathLen));
        } else {
          throw new IOException("Attribute name not recognized by " +
                                "CertAttrSet:BasicConstraints.");
        }
    }
1185197
def get_view(cls, method_name):
        
        method = getattr(cls, method_name)

        @wraps(method)
        def view(request, **kwargs):
            handler = cls(request, kwargs)
            handler.call_processors('view')
            response = None
            try:
                response = method(handler)
                return response
            finally:
                handler.call_processors('post_view', response=response)

        return view
1042452
public Object getAttribute(String attributeName) {
    try {
      final int index = Integer.parseInt(attributeName) - 1;
      if (index < reportable.getMaxEntriesToKeep()) {
        return reportable.get(index).getValue();
      }
    } catch (NumberFormatException e) {
      LOGGER.error("Should never happen! Requested attribute should be an integer but was: " + attributeName);
    }
    return null;
  }