MCPcopy Index your code
hub / github.com/beanshell/beanshell / hasObjectPropertySetter

Method hasObjectPropertySetter

src/bsh/Reflect.java:714–726  ·  view source on GitHub ↗
(Class clas, String propName)

Source from the content-addressed store, hash-verified

712
713
714 public static boolean hasObjectPropertySetter(Class clas, String propName) {
715 String setterName = accessorName("set", propName);
716 Method[] methods = clas.getMethods();
717
718 // we don't know the right hand side of the assignment yet.
719 // has at least one setter of the right name?
720 for (Method method : methods) {
721 if (method.getName().equals(setterName)) {
722 return true;
723 }
724 }
725 return false;
726 }
727
728
729 public static Object getObjectProperty(Object obj, String propName) throws UtilEvalError, ReflectError {

Callers 1

getLHSObjectFieldMethod · 0.95

Calls 4

accessorNameMethod · 0.95
getMethodsMethod · 0.65
equalsMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected