Questions tagged [method-declaration]
36 questions
2
votes
1 answer
Understanding enumset for enumerators
As far as I understood it would be much easier and clearler to use EnumSet and that the Set was specifically designed for using with Enumerators. My question is whether we should consider to use the EnumSet every time we need to maintain some…

user3663882
- 6,957
- 10
- 51
- 92
2
votes
1 answer
Java MethodDeclaration ClassOrInterfaceDeclaration finding class names
I'm using the MethodDeclaration for a java parser that reads in source code but I'm having some problems. I can't see any methods which give me the class that this belongs to. Does a method exist for this or do I need to look in the java parser to…

Steven
- 93
- 1
- 11
2
votes
1 answer
Opening Java enum method declarations in Eclipse
Eclipse provides a feature to open the declarations of fields, invoked methods etc.
(F3 or Right click => Open declaration or Ctrl + click on the invoked method)
However, in the case of enum methods this feature doesn't function, e.g.…

Juvanis
- 25,802
- 5
- 69
- 87
2
votes
1 answer
Objective-C Strange Method Declaration
I was recently looking at some old source code from another company's project and came across the following method definition:
-(double)getDistance :Latitude :Longitude
I understand what the method does, but I've never seen an Objective-C method…

MikeS
- 3,891
- 6
- 35
- 51
2
votes
1 answer
Message Not Understood for existing method
Ok, so it's like this:
receiver selectors
returns
#(#expression #expression: #mondrianLabel #accept: #name)
But
receiver expression
throws MessageNotUnderstood.
Any ides how to fix this and why this can be caused?

Uko
- 13,134
- 6
- 58
- 106
1
vote
0 answers
What's wrong with my method call I try to learn React and must pass component and Props to child
I learn Reactjs and javascript and wanted to call this withFetching Component but don't understand how to set the arguments correctly. I understand overall logic but still learning the details
Here is the switch where I call the withFetching
…

Kid
- 1,869
- 3
- 19
- 48
1
vote
2 answers
How to implement object specific methods?
I'm playing around with a Java game, and I'm currently trying to implement a Menu system. I have a Menu class and MenuBox class, what i'd like to do is have an abstract method in the MenuBox class that i would define somewhere else in the code since…

pool matho
- 39
- 11
1
vote
2 answers
Can I use the keyword "in" to separate parameters in a method declaration somehow?
I would like to create a method that uses the keyword in instead of a comma to separate parameters in a method declaration; something similar to the foreach(a in b) method.
Example
Class Structure
public class Length
{
public double Inches;
…

Tyler Pantuso
- 835
- 8
- 16
1
vote
1 answer
Why doesn't the method main() require '=' in its definition in Scala?
Possible Duplicate:
scala: 'def foo = {1}' vs 'def foo {1}'
Why is it that when defining the method main in Scala, there is no need to use a =?
Example:
def main(args:Array[String]) {
...
But if one wants to define another function it…

ses
- 13,174
- 31
- 123
- 226
0
votes
2 answers
Method and Variable Scope Issue in Java
I need help I cannot figure out how to fix the scope of my variables. I want this to be an example for my notes but have been on it for almost 2 hours.
public class methodPractice{
String streetName;
int streetNum;
public static void…

jorge reyes
- 15
- 2
0
votes
1 answer
Typescript Function Declaration, style difference
I started to use Typescript and i don't get what differences in these method declarations are:
onSave(){ /*method body*/ }
public onSave = () => { /*method body*/ }
Also, What I am supposed to search on Google or StackOverflow to find more about…

Im Flash
- 45
- 1
- 8
0
votes
3 answers
Identify a method and it's scope while reading a source code with a file reader?
I am trying to search a specific string in the source code so that I can identify the string is found in which method.I tried file reader. But failed . How to identify a method and it's scope while reading a source code with a file reader? Is there…

Rubayat Jinnah
- 414
- 4
- 20
0
votes
4 answers
AngularJS : Is it necessary to bind all my controller methods to $scope
When do we need to bind an method to $scope in controller,i am dealing with methods which is just mapping operation on object.
Example :
$scope.myVar = {};
function myMyObject(x) {
$scope.myVar = {
"xKey":x
…

jsduniya
- 2,464
- 7
- 30
- 45
0
votes
1 answer
Open method declaration in Eclipse
In Net beans, we can open the declaration of anything by pressing "Ctrl" and clicking on the target (whether it be a CSS file or method or anything else). How can we do the same in Eclipse ?
I saw several posts on internet that suggests pressing F3…

HelmBurger
- 1,168
- 5
- 15
- 35
0
votes
1 answer
C# method definition is too complicated
When I looked at the documentation of the EditorFor method from the MVC library I came across this method definition :
public static MvcHtmlString EditorFor {
this HtmlHelper html,
Expression>…

user3908357
- 13
- 2