Return the getter and setter wrapper method names. Result is an array of [getter_name, setter_name].
 An exception is raised if the class already has a method with either name.
345782
def locale_dating_wrapper_method_names(attr_name, options)
      getter_name = options[:name].try(:to_sym)
      getter_name ||= "#{attr_name}_#{options[:ending]}".to_sym
      setter_name = "#{getter_name}=".to_sym
      # Detect if the names overwrite existing methods on the generated instance and prevent it. (presumed to be unintentional)
      class_eval do
        raise MethodOverwriteError, "locale_dating setting would overwrite method '#{getter_name}' for attribute '#{attr_name}'" if self.respond_to?(getter_name)
        raise MethodOverwriteError, "locale_dating setting would overwrite method '#{setter_name}' for attribute '#{attr_name}'" if self.respond_to?(setter_name)
      end
      # Return the values
      [getter_name, setter_name]
    end
1235773
def get_method(self, name):
        
        # TODO could use a generator here
        prog = re.compile(name)
        l = []
        for i in self.get_classes():
            for j in i.get_methods():
                if prog.match(j.get_name()):
                    l.append(j)
        return l
140254
def variable_names(self):
        
        result = []
        names = javabridge.call(self.jobject, "getVariableNames", "()Ljava/util/Set;")
        for name in javabridge.iterate_collection(names):
            result.append(javabridge.to_string(name))
        return result
175334
def _get_setter_fun(object_type,           # type: Type
                    parameter,             # type: Parameter
                    private_property_name  # type: str
                    ):
    
    # the property will have the same name than the constructor argument
    property_name = parameter.name

    overridden_setters = getmembers(object_type, _has_annotation(__SETTER_OVERRIDE_ANNOTATION, property_name))

    if len(overridden_setters) > 0:
        # --check that we only have one
        if len(overridden_setters) > 1:
            raise DuplicateOverrideError('Setter is overridden more than once for attribute name : %s' % property_name)

        # --use the overridden setter
        setter_fun = overridden_setters[0][1]

        try:
            # python 2
            setter_fun = setter_fun.im_func
        except AttributeError:
            pass

        # --find the parameter name and check the signature
        s = signature(setter_fun)
        p = [attribute_name for attribute_name, param in s.parameters.items() if attribute_name is not 'self']
        if len(p) != 1:
            try:
                qname = setter_fun.__qualname__
            except AttributeError:
                qname = setter_fun.__name__
            raise IllegalSetterSignatureException('overridden setter must have only 1 non-self argument, found ' +
                                                  '%s for function %s'
                                                  '' % (len(s.parameters.items()) - 1, qname))
        var_name = p[0]

    else:
        # --create the setter, equivalent of:
        # ** Dynamically compile a wrapper with correct argument name **
        sig = Signature(parameters=[Parameter('self', kind=Parameter.POSITIONAL_OR_KEYWORD), parameter])

        @with_signature(sig)
        def autoprops_generated_setter(self, **kwargs):
            setattr(self, private_property_name, kwargs.popitem()[1])

        setter_fun = autoprops_generated_setter
        var_name = property_name

    return setter_fun, var_name
1199160
private static List<Method> getPropertyMethods(Class entityClass) {
        List<Method> result = new ArrayList<Method>();
        for (Method m : entityClass.getMethods()) {
            if (m.getParameterTypes().length == 0 && m.getName().startsWith("get") && m.getReturnType() != void.class) {
                if (m.getName().equals("getClass")) continue;
                result.add(m);
            }
        }
        return result;
    }
313272
def get_name(cls):
        
        if not hasattr(cls.Meta, 'name'):
            class_name = getattr(cls.get_model(), '__name__', None)
            setattr(
                cls.Meta,
                'name',
                inflection.underscore(class_name) if class_name else None
            )

        return cls.Meta.name
17007
static Class<?> getSetterType(Method setter) {
		Class<?>[] parameterTypes = setter.getParameterTypes();
		if (parameterTypes.length != 1) {
			throw new BeanUtilsException(
					String.format("Method %s has %d parameters and cannot be a setter", setter.getName(), parameterTypes.length));
		}

		return parameterTypes[0];
	}
169426
private static String getPropertyName(Method method) {
		String propertyName = method.getName();
		if (propertyName.startsWith("get")) {
			propertyName = propertyName.substring(3);
		} else if (propertyName.startsWith("is")) {
			propertyName = propertyName.substring(2);
		}
		propertyName = propertyName.substring(0, 1).toLowerCase() + propertyName.substring(1);
		return propertyName;
	}
1280829
private static <T> List<Method> getMethods(Class<T> type, String... names) {

		Assert.notNull(type, "Missing class to search for methods!");
		Assert.notNullOrEmpty(names, "Missing method names to search for!");

		Map<String, Method> candidates = new HashMap<>();
		for (Method method : type.getMethods()) {

			if (Modifier.isStatic(method.getModifiers()) &&
			    method.getReturnType().equals(type) &&
			    method.getParameterTypes().length == 1 &&
			    method.getParameterTypes()[0].isAssignableFrom(String.class)) {

				candidates.put(method.getName(), method);
			}
		}

		List<Method> output = new ArrayList<>();

		// go in order desired
		for (String name : names) {
			if (candidates.containsKey(name)) {
				output.add(candidates.get(name));
			}
		}

		return output;
	}
522499
public static String[] getParameterNames(CtMethod ctMethod) throws NotFoundException {
		MethodInfo methodInfo = ctMethod.getMethodInfo();
		CodeAttribute codeAttribute = methodInfo.getCodeAttribute();
		// logger.info("methodInfo.getConstPool().getSize():");
		LocalVariableAttribute attribute = (LocalVariableAttribute) codeAttribute.getAttribute(LocalVariableAttribute.tag);
		// String[] names = new String[attribute.tableLength() - 1];
		String[] paramNames = new String[ctMethod.getParameterTypes().length];

		int pos = 0;
		if (true) {
			int size = attribute.tableLength();
			if (size > 0) {
				String[] names = new String[size - 1];
				for (int i = 0; i < names.length; i++) {
					names[i] = attribute.variableName(i);
					if ("this".equals(names[i])) {
						pos = i + 1;
						break;
					}
				}
				// logger.info(methodInfo.getName() + " pos:" + pos + " allNames:" + StringUtils.join(names, ", "));
			}
		}

		// logger.info(methodInfo.getName() + " pos:" + pos);
		for (int i = 0; i < paramNames.length; i++) {
			// paramNames[i] = attribute.variableName(i + 1);
			try {
				paramNames[i] = attribute.variableName(i + pos);
				// logger.info("paramNames[" + i + "]:" + paramNames[i]);
			}
			catch (RuntimeException e) {
				throw e;
			}
		}
		// System.err.println("paramNames:" + StringUtils.join(paramNames));
		return paramNames;
	}
847366
def getter_to_setter(getter)
      getter = getter.strip.gsub(/\(\s*\)/, '')

      # Check to see if this can be converted to a setter
      if getter[0] =~ /^[A-Z]/ && getter[-1] != ')'
        if getter.index('.')
          "#{getter}=(val)"
        else
          "raise \"could not auto generate setter for `#{getter}`\""
        end
      elsif getter[0] =~ /^[a-z_]/ && getter[-1] != ')'
        # Convert a getter into a setter
        if getter.index('.') || getter.index('@')
          prefix = ''
        else
          prefix = 'self.'
        end

        "#{prefix}#{getter}=(val)"
      else
        "raise \"could not auto generate setter for `#{getter}`\""
      end
    end
274292
def has_class_methods(*class_method_names):
    

    def test(cls):
        if not isinstance(cls, type):
            cls = type(cls)
        for class_method_name in class_method_names:
            try:
                class_method = getattr(cls, class_method_name)
                if class_method.__self__ is not cls:
                    return False
            except AttributeError:
                return False
        return True

    return test
1267772
static Set<Method> getSetters(Class<?> targetClass, String propertyName) {
		String setterName = setterName(propertyName);
		Set<Method> setters = new HashSet<>();

		while (targetClass != null) {
			for (Method method : targetClass.getDeclaredMethods()) {
				if (method.getName().equals(setterName) && method.getParameterTypes().length == 1) {
					logger.debug("Found setter {} in class {}", method, targetClass);
					setters.add(method);
				}
			}
			targetClass = targetClass.getSuperclass();
		}

		return setters;
	}
843149
def class_param_names(cls, hidden=True):
        
        param_names = set(
            k for (k, v) in cls.__dict__.items()
            if isinstance(v, Parameter)
        )
        for parent in cls.__bases__:
            if hasattr(parent, 'class_param_names'):
                param_names |= parent.class_param_names(hidden=hidden)

        if not hidden:
            param_names = set(n for n in param_names if not n.startswith('_'))
        return param_names
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
1330654
def get_method_name(method):
    

    name = get_object_name(method)
    if name.startswith("__") and not name.endswith("__"):
        name = "_{0}{1}".format(get_object_name(method.im_class), name)
    return name
828653
public static String[] getMethodParamNames(final Method m) {
        if (METHOD_NAMES_POOL.containsKey(m)) return METHOD_NAMES_POOL.get(m);

        final String[] paramNames = new String[m.getParameterTypes().length];
        final String   n          = m.getDeclaringClass().getName();
        ClassReader    cr;
        try {
            cr = new ClassReader(n);
        } catch (IOException e) {
            return null;
        }
        cr.accept(new ClassVisitor(Opcodes.ASM5) {
            @Override
            public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) {
                final Type[] args = Type.getArgumentTypes(desc);
                // The method name is the same and the number of parameters is the same
                if (!name.equals(m.getName()) || !sameType(args, m.getParameterTypes())) {
                    return super.visitMethod(access, name, desc, signature, exceptions);
                }
                MethodVisitor v = super.visitMethod(access, name, desc, signature, exceptions);
                return new MethodVisitor(Opcodes.ASM5, v) {
                    @Override
                    public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) {
                        int i = index - 1;
                        // if it is a static method, the first is the parameter
                        // if it's not a static method, the first one is "this" and then the parameter of the method
                        if (Modifier.isStatic(m.getModifiers())) {
                            i = index;
                        }
                        if (i >= 0 && i < paramNames.length) {
                            paramNames[i] = name;
                        }
                        super.visitLocalVariable(name, desc, signature, start, end, index);
                    }
                };
            }
        }, 0);
        METHOD_NAMES_POOL.put(m, paramNames);
        return paramNames;
    }