Home
last modified time | relevance | path

Searched refs:addMethod (Results 1 – 25 of 65) sorted by relevance

123

/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/builders/
DNodeWithParametersBuildersTest.java42 MethodDeclaration addMethod = cu.addClass("test").addMethod("foo", Modifier.PUBLIC); in testAddParameter() local
43 addMethod.addParameter(int.class, "yay"); in testAddParameter()
44 Parameter myNewParam = addMethod.addAndGetParameter(List.class, "myList"); in testAddParameter()
47 assertEquals(2, addMethod.getParameters().size()); in testAddParameter()
48 assertEquals("yay", addMethod.getParameter(0).getNameAsString()); in testAddParameter()
49 assertEquals("List", addMethod.getParameter(1).getType().toString()); in testAddParameter()
50 assertEquals(myNewParam, addMethod.getParameter(1)); in testAddParameter()
55 MethodDeclaration addMethod = cu.addClass("test").addMethod("foo", Modifier.PUBLIC); in testGetParamByName() local
56 Parameter addAndGetParameter = addMethod.addAndGetParameter(int.class, "yay"); in testGetParamByName()
57 assertEquals(addAndGetParameter, addMethod.getParameterByName("yay").get()); in testGetParamByName()
[all …]
DNodeWithMembersBuildersTest.java50 MethodDeclaration addMethod = classDeclaration.addMethod("foo", Modifier.PUBLIC); in testAddMethod() local
52 assertEquals(addMethod, classDeclaration.getMember(0)); in testAddMethod()
53 assertEquals("foo", addMethod.getNameAsString()); in testAddMethod()
77 MethodDeclaration addMethod = classDeclaration.addMethod("foo", Modifier.PUBLIC); in testGetMethodsWithName() local
78 …MethodDeclaration addMethod2 = classDeclaration.addMethod("foo", Modifier.PUBLIC).addParameter(int… in testGetMethodsWithName()
81 assertTrue(methodsByName.contains(addMethod)); in testGetMethodsWithName()
87 MethodDeclaration addMethod = classDeclaration.addMethod("foo", Modifier.PUBLIC); in testGetMethods() local
88 …MethodDeclaration addMethod2 = classDeclaration.addMethod("foo", Modifier.PUBLIC).addParameter(int… in testGetMethods()
93 assertTrue(methods.contains(addMethod)); in testGetMethods()
99 classDeclaration.addMethod("foo", Modifier.PUBLIC); in testGetMethodsWithParameterTypes()
[all …]
DNodeWithThrownExceptionsBuildersTest.java40 MethodDeclaration addMethod = cu.addClass("test").addMethod("foo", Modifier.PUBLIC); in testThrows() local
41 addMethod.addThrownException(IllegalStateException.class); in testThrows()
42 assertEquals(1, addMethod.getThrownExceptions().size()); in testThrows()
43 assertEquals(true, addMethod.isThrown(IllegalStateException.class)); in testThrows()
44 addMethod.addThrownException(parseClassOrInterfaceType("Test")); in testThrows()
45 assertEquals(2, addMethod.getThrownExceptions().size()); in testThrows()
46 assertEquals("Test", addMethod.getThrownException(1).toString()); in testThrows()
/external/javassist/src/main/javassist/tools/reflect/
DReflection.java261 clazz.addMethod(CtNewMethod.getter(metaobjectGetter, f)); in modifyClassfile()
262 clazz.addMethod(CtNewMethod.setter(metaobjectSetter, f)); in modifyClassfile()
271 clazz.addMethod(CtNewMethod.getter(classobjectAccessor, f)); in modifyClassfile()
315 clazz.addMethod(m2); in processMethods0()
332 clazz.addMethod(wmethod); in processMethods0()
371 clazz.addMethod(wmethod); in processFields()
380 clazz.addMethod(wmethod); in processFields()
/external/javassist/sample/vector/
DVectorAssistant.java97 vec.addMethod(CtNewMethod.copy(addmethod, "add", vec, map)); in makeSubclass()
98 vec.addMethod(CtNewMethod.copy(atmethod, "at", vec, map)); in makeSubclass()
124 vec.addMethod(m); in makeSubclass2()
127 vec.addMethod(m); in makeSubclass2()
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/writer/
DTypeWriter.java49 public MethodWriter addMethod(TypeWriter returnType, String name) { in addMethod() method in TypeWriter
55 public MethodWriter addMethod(TypeMirror returnType, String name) { in addMethod() method in TypeWriter
62 public MethodWriter addMethod(TypeName returnType, String name) { in addMethod() method in TypeWriter
68 public MethodWriter addMethod(Class<?> returnType, String name) { in addMethod() method in TypeWriter
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/printer/
DPrettyPrintVisitorTest.java181 cu.addClass("X").addMethod("abc").setJavadocComment("line1\n line2 *\n * line3"); in multilineJavadocGetsFormatted()
198 cu.addClass("X").addMethod("abc").setJavadocComment(""); in emptyJavadocGetsFormatted()
212 cu.addClass("X").addMethod("abc").setJavadocComment("\n\n\n ab\n\n\n cd\n\n\n"); in multilineJavadocWithLotsOfEmptyLinesGetsFormattedNeatly()
229 cu.addClass("X").addMethod("abc").setJavadocComment("line1"); in singlelineJavadocGetsFormatted()
244 cu.addClass("X").addMethod("abc").setComment(new LineComment(" line1 \n ")); in singlelineCommentGetsFormatted()
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/remove/
DNodeRemovalTest.java63 MethodDeclaration addMethod = testClass.addMethod("testM"); in testRemoveStatementFromMethodBody() local
64 BlockStmt methodBody = addMethod.createBody(); in testRemoveStatementFromMethodBody()
/external/jacoco/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/
DClassPageTest.java39 node.addMethod(new MethodCoverageImpl("a", "()V", null)); in setup()
40 node.addMethod(new MethodCoverageImpl("b", "()V", null)); in setup()
41 node.addMethod(new MethodCoverageImpl("c", "()V", null)); in setup()
/external/javaparser/javaparser-symbol-solver-testing/src/test/resources/javaparser_methodcalls_expected_output/
Dcom_github_javaparser_ast_body_FieldDeclaration.txt38 …Line 206) parentClass.addMethod("get" + fieldNameUpper, PUBLIC) ==> com.github.javaparser.ast.node…
39 …Line 208) parentEnum.addMethod("get" + fieldNameUpper, PUBLIC) ==> com.github.javaparser.ast.nodeT…
58 …Line 239) parentClass.addMethod("set" + fieldNameUpper, PUBLIC) ==> com.github.javaparser.ast.node…
59 …Line 241) parentEnum.addMethod("set" + fieldNameUpper, PUBLIC) ==> com.github.javaparser.ast.nodeT…
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/
DComponentWriter.java71 ? componentWriter.addMethod( in createBuilder()
79 : componentWriter.addMethod(builderWriter, "builder"); in createBuilder()
89 componentWriter.addMethod(componentDefinitionTypeName(), "create"); in addFactoryMethods()
DMonitoringModuleGenerator.java78 classWriter.addMethod(SET_OF_FACTORIES, "defaultSetOfFactories"); in write()
88 MethodWriter monitorMethod = classWriter.addMethod(ProductionComponentMonitor.class, "monitor"); in write()
DAbstractComponentWriter.java330 builderWriter.addMethod( in addBuildMethod()
334 buildMethod = builderWriter.addMethod(componentDefinitionTypeName(), "build"); in addBuildMethod()
403 MethodWriter builderMethod = builderWriter.addMethod( in addBuilderMethods()
438 ? builderWriter.addMethod(returnType, methodName) in addBuilderMethodFromSpec()
439 : builderWriter.addMethod(builderWriter, methodName); in addBuilderMethodFromSpec()
597 ? componentWriter.addMethod( in implementInterfaceMethods()
599 : componentWriter.addMethod( in implementInterfaceMethods()
688 componentWriter.addMethod(VoidName.VOID, "initialize" + ((i == 0) ? "" : i)); in initializeFrameworkTypes()
/external/javassist/src/test/test/javassist/proxy/
DProxyCacheGCTest.java71 ctTargetClass.addMethod(targetMethod); in createProxy()
80 ctHandlerClass.addMethod(handlerInvoke); in createProxy()
87 ctFilterClass.addMethod(filterIsHandled); in createProxy()
/external/javaparser/javaparser-core-generators/src/main/java/com/github/javaparser/generator/
DGenerator.java61addMethod(containingClassOrInterface, callable, () -> containingClassOrInterface.addMember(callabl… in addOrReplaceWhenSameSignature()
70 addMethod(containingClassOrInterface, callable, in replaceWhenSameSignature()
76 private void addMethod( in addMethod() method in Generator
/external/xmlrpcpp/src/
DXmlRpcServer.cpp32 XmlRpcServer::addMethod(XmlRpcServerMethod* method) in addMethod() function in XmlRpcServer
259 addMethod(_listMethods); in enableIntrospection()
260 addMethod(_methodHelp); in enableIntrospection()
DXmlRpcServerMethod.cpp12 if (_server) _server->addMethod(this); in XmlRpcServerMethod()
/external/javassist/src/main/javassist/compiler/
DAccessorMaker.java71 cf.addMethod(minfo); in getConstructor()
133 cf.addMethod(minfo); in getMethodAccessor()
185 cf.addMethod(minfo); in getFieldGetter()
240 cf.addMethod(minfo); in getFieldSetter()
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javaparser_new_src/javaparser-core/com/github/javaparser/ast/body/
DFieldDeclaration.java206 getter = parentClass.addMethod("get" + fieldNameUpper, PUBLIC); in createGetter()
208 getter = parentEnum.addMethod("get" + fieldNameUpper, PUBLIC); in createGetter()
239 setter = parentClass.addMethod("set" + fieldNameUpper, PUBLIC); in createSetter()
241 setter = parentEnum.addMethod("set" + fieldNameUpper, PUBLIC); in createSetter()
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/body/
DFieldDeclaration.java188 … = parentClass.map(clazz -> clazz.addMethod("get" + fieldNameUpper, PUBLIC)).orElseGet(() -> paren… in createGetter()
215 … = parentClass.map(clazz -> clazz.addMethod("set" + fieldNameUpper, PUBLIC)).orElseGet(() -> paren… in createSetter()
/external/javassist/src/test/test/javassist/bytecode/analysis/
DAnalyzerTest.java210 clazz.addMethod(method); in generateDeadCode()
227 clazz.addMethod(method); in generateInvalidCode()
243 clazz.addMethod(method); in generateCodeFalloff()
266 clazz.addMethod(method); in generateJsrMerge()
288 clazz.addMethod(method); in generateJsrMerge2()
/external/jacoco/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/
DClassCoverageImplTest.java101 node.addMethod(createMethod(false)); in testAddMethodMissed()
109 node.addMethod(createMethod(true)); in testAddMethodCovered()
/external/javassist/src/main/javassist/
DCtNewWrappedMethod.java154 classfile.addMethod(body); in addBodyMethod()
158 cache.addMethod(new CtMethod(body, clazz)); in addBodyMethod()
/external/javassist/sample/evolve/
DEvolution.java139 absClass.addMethod(wm); in makeAbstractClass()
155 absClass.addMethod(m2); in makeAbstractClass()
/external/javassist/src/main/javassist/tools/rmi/
DStubGenerator.java151 proxy.addMethod(CtNewMethod.getter(accessorObjectId, f)); in produceProxyClass()
222 proxy.addMethod(wmethod); in addMethods()

123