Questions tagged [method-invocation]

135 questions
0
votes
1 answer

How to reference calling form from a method invoked from dynamically loaded DLL

I have a winform application and a service DLL (C#), both in the same solution and namespace. I'm loading the DLL dynamically so I can update the DLL in the future. The main form invokes a method from the dynamically loaded DLL and passes…
Yoram
  • 179
  • 1
  • 2
  • 9
0
votes
1 answer

What is the difference between a Method and MetaMethod in Groovy?

The API docs here: http://groovy.codehaus.org/api/groovy/lang/MetaMethod.html Explain a MetaMethod as the following: [A MetaMethod] represents a Method on a Java object a little like Method except without using reflection to invoke the…
ZenBalance
  • 10,087
  • 14
  • 44
  • 44
0
votes
2 answers

Dynamic Method Lookup in Java

I am trying to get my head around Dynamic method invoking in java and not able to understand why java does not let me invoke method from subclass instead of method of superclass. For example: If I have 2 classes Test and Test2. Test2 inherits from…
Dinesh
  • 3,065
  • 1
  • 18
  • 19
0
votes
2 answers

Overwriting methods: how to "inject" into the super-method?

Assuming three classes, one being a subclass of the other. Each overwrite the parents' method. public class BaseClass { public void doStuff() { performBaseTasks(); } } public class MiddleClass extends BaseClass { //…
Niklas R
  • 16,299
  • 28
  • 108
  • 203
0
votes
2 answers

Several Interfaces for one InvocationHandler

Is it possible to define ONE invocationhandler (proxy) for SEVERAL objects with different interfaces ? Because what this proxy does(all the checkings & etc.) on the objects are same (and they share a lock management table which I prefer to have it…
Arian
  • 7,397
  • 21
  • 89
  • 177
0
votes
1 answer

Need to make a non blocking / asynchronous method call from my application

Possible Duplicate: How to make an make a web request in an async manner I need to make a non blocking asynchronous method call from my application. There is an http url which i need to call but in asynchronous way. example: URL myPage = new…
0
votes
2 answers

Calling running Java code from running C++ code and vice versa

my question is how to call running Java code from running C++ code and vice versa. There are several posts available concerned with calling compiled c++ files from Java or JVM from C unsing Java Native Interface (JNI) or Java Native Access (JNA).…
-1
votes
4 answers

Java method invocations give two different results

I have simple method doubleChar that receives a String, doubles each character and returns a String. Then I have two invocations in main method. First straightforward invocation gives no result, but second invocation inside println method gives the…
Edson
  • 11
-1
votes
4 answers

Validating two dates on android studio

I need to validate 2 date, one is picked by the user and the other is the one that I get form the calendar... this is what I try so far without success: Calendar c = Calendar.getInstance(); if(!DateIsOlder(txtVwAppointmentDate.getText(),…
-1
votes
1 answer

Failure in invoking method through instance

I have this absolutely preposterous error which I have completely given up on. Here is my code: class SaveGame: def __init__ (self): self.stats ={'strength':player.strength, 'dexterity':player.dexterity, 'inventory':player.inventory,…
-2
votes
1 answer

Java String contains two-sided

I created the following lambda to represent a BiPredicate. (s1, s2) -> s1.getArtist().contains(s2.getArtist()) || s2.getArtist().contains(s1.getArtist()) Now I'm wondering if there is a way to make this more concise, maybe by using a method…
xeruf
  • 2,602
  • 1
  • 25
  • 48
-2
votes
1 answer

how to invoke Result Set method in java?

ResultSet data_result = dao.getDetails(); Method resultset_method; resultset_method = data_result.getClass().getMethod("getInt", Integer.class); it is giving error: java.lang.NoSuchMethodException:…
MaheshPVM
  • 158
  • 1
  • 13
-2
votes
1 answer

Is there a framework to limit method invoke rate in java?

I hava a java method that can not be invoke more than N times in one second, is there a framework or utils can do this work. When too many invocations, it can hold and balance the invocation request.
lichengwu
  • 4,277
  • 6
  • 29
  • 42
-3
votes
1 answer

How to implement function with multiple invocations

How do I implement a adder function in javascript which can be invoked like adder(1,2)(5,6,2)(4,9,10,11)(6,7).....() The function should accept any number of arguments and add them all together. The function can be invoked in following…
SatishP
  • 23
  • 3
-4
votes
1 answer

Why does negation comparison in IF statement invokes a method

I have following code if ( !handleOptions(args) ) { return false; } if ( !initConfig() ) { logger.error("Error initializing configuration. Terminating"); return false; } And the code itself is self explaining…
Lone_Wanderer
  • 179
  • 1
  • 3
  • 16
1 2 3
8
9