Open topic with navigation

TIBCO® Enterprise Administrator 2.4.2

# Using Position and Named Arguments while Defining TeaParam

The definition of TeaParam provides four options when it comes to supporting positions and named arguments: position only, position and named arguments without an alias, position and named arguments with an alias, and named argument only.

The following is the usage of the four ways of defining the positions and named arguments:

- Position only:

      TeaParam definition

      public String testA(@TeaParam(name = "aa", description = "Greetings parameter", alias = "") final long[] greetings)
      Usage

      shell> testA [12,15]

- Position and named arguments without an alias:

      TeaParam definition
      public String testA(@TeaParam(name = "aa", description = "Greetings parameter") final long[] greetings)

      Usage
      shell> testA [12,15]
      shell> testA -aa [12,15]
      shell> testA --aa [12,15]

- Position and named arguments with an alias:

      TeaParam definition
      public String testA(@TeaParam(name = "aa", description = "Greetings parameter", alias="bb") final long[] greetings)

      Usage
      shell> testA [12,15]
      shell> testA -aa [12,15]
      shell> testA --aa [12,15]
      shell> testA -bb [12,15]
      shell> testA --bb [12,15]

- Named argument only:

      TeaParam definition
      public String testA(@TeaParam(name = "aa", description = "Greetings parameter", alias="aa") final long[] greetings)

      Usage
      shell> testA -aa [12,15]
      shell> testA --aa [12,15]

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Enterprise Administrator

Copyright © 1996-2025. Cloud Software Group, Inc. All Rights Reserved.