Method_signature Method_signature

Method signature - Definition and Overview

Related Words: X, Accent, Acceptance, Accommodation, Acknowledgment, Affirmation, Approval, Arrangement, Article, Authentication, Authorization, Autograph, Back, Badge, Banner, Bar
This article or section should be merged with type signature.

In computer programming, especially object-oriented programming, a method is commonly identified by its unique method signature. This usually includes the method name, the number and type of its parameters, and its return type. A method signature is the smallest type of a method.

In the Objective-C programming language, method signatures for an object are declared in the interface header file. For example,

- (id)initWithInt:(int)value;

defines a method initWithInt that returns a general object (an id) and takes one integer argument. Objective-C only requires a type in a signature to be explicit when the type is not id; this signature is equivalent:

- initWithInt:(int)value;

In the Java programming language, method signatures for an object is the method name and the number and type of its parameters. Return types are not considered to be a part of the method signature.

- return_type method_name(parameters) {...}
Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.