MCPcopy Index your code
hub / github.com/antlr/codebuff / tryGetMethod

Method tryGetMethod

output/java8/1.4.16/ObjectModelAdaptor.java:123–140  ·  view source on GitHub ↗
(Class<?> clazz, String methodName)

Source from the content-addressed store, hash-verified

121 }
122
123 protected static Method tryGetMethod(Class<?> clazz, String methodName) {
124 try {
125 Method method = clazz.getMethod(methodName);
126 if ( method!=null ) {
127 method.setAccessible(true);
128 }
129 return method;
130 }
131 catch (NoSuchMethodException ex) {
132
133
134 }
135 catch (SecurityException ex) {
136
137
138 }
139 return null;
140 }
141
142 protected static Field tryGetField(Class<?> clazz, String fieldName) {
143 try {

Callers 1

findMemberMethod · 0.95

Calls 1

setAccessibleMethod · 0.45

Tested by

no test coverage detected