Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 854107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:52:10+00:00 2026-05-15T07:52:10+00:00

It might be a bit difficult to explain, so I’ll give some example code.

  • 0

It might be a bit difficult to explain, so I’ll give some example code. Note that I’m using NetBeans IDE (latest).

class Dummy {
    public function say(){ }
}
/**
 * Builds dummy class and returns it.
 * @return Dummy The dummy class.
 */
function say_something(){
  return new Dummy();
}
$s=say_something();

While developing in netbeans I can invoke auto-complete by hitting ctrl+space after typing “$s->”.
In the the hint window that follows, there is the item “say()”. This is because the javadoc says say_something returns a Dummy and NetBeans parsed Dummy class to know that it has a method called “say()”.

So far so good.

My problem is with arrays. Example code follows:

/**
 * Builds array of 2 dummy classes and returns it.
 * @return Array The dummy class. (*)
 */
function say_something2(){
  return array(new Dummy(),new Dummy());
}
$s=say_something2();

If I try the auto-complete thing again but with “$s[0]->” instead, I don’t get the methods fro Dummy class. This is because in the JavaDoc I only said that it is an array, but not the values’ type.

So the question would be, is there any JavaDoc syntax, cheat, whatever which allows me to tell JavaDoc what type of variables to expect in an array?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:52:11+00:00Added an answer on May 15, 2026 at 7:52 am

    You can’t. See the documentation here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a bit difficult to explain in writing, so please bear with
This might be a bit difficult to explain but I have two columns in
It might be confusing and a bit difficult. I have a $fcomm variable that
Might be a bit of noob question but it's something that's been getting me
The question might seem a bit confusing but I have an if statement that
I might sound a bit weird but, is there a way? For example, I
I am trying to write a program to check that some C source code
This was a bit difficult to explain in the title, but I should be
I'm having a bit of difficulty adding some CSS to a link. I'm using
this might be a bit long so my apologies. consider the following code (i've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.