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 726487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:27:28+00:00 2026-05-14T06:27:28+00:00

My co-worker and I have come across this warning message a couple times recently.

  • 0

My co-worker and I have come across this warning message a couple times recently. For the below code:

package com.mycompany.product.data;

import com.mycompany.product.dao.GenericDAO;

public abstract class EntityBean {
    public abstract GenericDAO<Object, Long> getDAO();
    //                                       ^^^^^^      <-- WARNING OCCURS HERE
}

the warning appears in the listed spot as

EntityBean.getDAO() has non-API return type GenericDAO<T, ID>

A Google search for “has non-API return type” only shows instances where this message appears in problem lists. I.e., there’s no public explanation for it.

What does this mean? We can create a usage problem filter in Eclipse to make the message go away, but we don’t want to do this if our usage is a legitimate problem.

Thanks!

EDIT: This warning doesn’t have to do with the parameterization, as this declaration of getFactory() also results in the same warning:

public abstract class EntityBean {
    protected DAOFactory getFactory() {
        return DAOFactory.instance(DAOFactory.HIBERNATE);
    }
}
  • 1 1 Answer
  • 0 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-14T06:27:28+00:00Added an answer on May 14, 2026 at 6:27 am

    Figured it out.

    These classes (GenericDAO and DAOFactory as return types) and EntityBean were in different packages. One of the packages (the one containing EntityBean) was listed in the Export-Package: section of the manifest file, and the other package (DAOs) was not. The net effect is that the DAO classes were non-API and were being returned by an API type.

    Thanks all, especially to JRL for orienting me in the right direction.

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

Sidebar

Related Questions

I have come across Evernote's bookmarklet and was wondering how this worked. You can
I'm learning objective-C and Cocoa and have come across this statement: The Cocoa frameworks
I have a Magento 1.5.0.1 site and have recently come across a problem which
While making my program i have come across this requirement that i have to
Recently I've come across a problem in my project. I normally compile it in
So with most unit testing utilities I have come across, you usually get access
I am new to VB programming and have come across an problem:( after a
I have been looking over several examples of backgroundworkers and I ran across code
I am building my website and come across this tricky issue: With the same
After spending much time researching about this on Google, I could not come across

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.