Template:PublicMethod: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>AntumDeluge Template for creating method representations |
imported>AntumDeluge Allow "paramlist", "return", & "rettype" parameters |
||
| Line 2: | Line 2: | ||
<blockquote> |
<blockquote> |
||
</noinclude>; ''<span style="color:green;">{{{1|}}}</span>({{#if: {{{params|}}} | {{{params|}}} }})'' |
</noinclude>; ''<span style="color:green;">{{{1|}}}</span>({{#if: {{{params|}}} | {{{params|}}} }})'' |
||
: {{#if: {{{desc|}}} | {{{desc|}}} }} |
: {{#if: {{{desc|}}} | {{{desc|}}} }} {{#if: {{{paramlist|}}} | |
||
{{{paramlist|}}} }} {{#if: {{{return|}}} | |
|||
: ''returns:'' {{#if: {{{rettype|}}} | (<code>{{{rettype|}}}</code>) }} {{{returns|}}} }}<noinclude></blockquote> |
|||
Template for creating method representations. |
Template for creating method representations. |
||
Example: |
|||
Test: |
|||
{{PublicMethod|helloWorld|desc=A test method.|params=param1, param2 |
{{PublicMethod | helloWorld | desc=A test method. | params=param1, param2|paramlist= |
||
{{MethodParam|param1|type=int|desc=First parameter}} |
{{MethodParam | param1 | type=int | desc=First parameter}} |
||
{{MethodParam|param2|type=String|desc=Second parameter}} |
{{MethodParam | param2 | type=String|desc=Second parameter}} |
||
| return=An integer value. | rettype=int}} |
|||
Revision as of 23:32, 19 April 2020
Template output:
- ()
Template for creating method representations.
Example:
- helloWorld (param1, param2)
- A test method.
- param1 : (
int) First parameter - param2 : (
String) Second parameter - returns: (
int)