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

Method getDeclaredMethods

src/bsh/ClassGenerator.java:183–203  ·  view source on GitHub ↗
(BSHBlock body, CallStack callstack, Interpreter interpreter, String defaultPackage)

Source from the content-addressed store, hash-verified

181
182
183 static DelayedEvalBshMethod[] getDeclaredMethods(BSHBlock body, CallStack callstack, Interpreter interpreter, String defaultPackage) throws EvalError {
184 List<DelayedEvalBshMethod> methods = new ArrayList<DelayedEvalBshMethod>();
185 for (int child = 0; child < body.jjtGetNumChildren(); child++) {
186 SimpleNode node = (SimpleNode) body.jjtGetChild(child);
187 if (node instanceof BSHMethodDeclaration) {
188 BSHMethodDeclaration md = (BSHMethodDeclaration) node;
189 md.insureNodesParsed();
190 Modifiers modifiers = md.modifiers;
191 String name = md.name;
192 String returnType = md.getReturnTypeDescriptor(callstack, interpreter, defaultPackage);
193 BSHReturnType returnTypeNode = md.getReturnTypeNode();
194 BSHFormalParameters paramTypesNode = md.paramsNode;
195 String[] paramTypes = paramTypesNode.getTypeDescriptors(callstack, interpreter, defaultPackage);
196
197 DelayedEvalBshMethod bm = new DelayedEvalBshMethod(name, returnType, returnTypeNode, md.paramsNode.getParamNames(), paramTypes, paramTypesNode, md.blockNode, null/*declaringNameSpace*/, modifiers, callstack, interpreter);
198
199 methods.add(bm);
200 }
201 }
202 return methods.toArray(new DelayedEvalBshMethod[methods.size()]);
203 }
204
205
206 /**

Callers 5

generateClassImplMethod · 0.95
classContainsMethodMethod · 0.80
setAccessibilityMethod · 0.80
collectMethodsMethod · 0.80
setMlistMethod · 0.80

Calls 9

insureNodesParsedMethod · 0.95
getReturnTypeNodeMethod · 0.95
getTypeDescriptorsMethod · 0.95
getParamNamesMethod · 0.80
jjtGetNumChildrenMethod · 0.65
jjtGetChildMethod · 0.65
addMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected