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

  • Home
  • SEARCH
  • 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 8563903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:04:41+00:00 2026-06-11T17:04:41+00:00

I have a model class ( MVC pattern ) that I’m using in two

  • 0

I have a model class (MVC pattern) that I’m using in two Eclipse projects.

One project, let’s call it Producer, is capturing data from a stream and storing it to a database. The model class in question, say ObjectModel, is used to deserialize the stream for manipulation before serializing and storing in the db.

Another project, let’s call it Consumer, is pulling in the data stored in the database and visualizing it on-screen. It uses the same model class to deserialize the stored data for use in the visualization application.

I planned to put ObjectModel into an Eclipse project to share its source across the Producer and Consumer projects. However, each application has classes currently in the same package that take advantage of the package-private access modifier to get and set fields in ObjectModel.

Is there any way I can share source across multiple Eclipse projects and still maintain package-private access with the shared source?

UPDATE: I was having trouble getting code shared across Eclipse projects, which is why I didn’t just try this before posting. Finally got that part working, and wrote it up as another answer here.

  • 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-06-11T17:04:42+00:00Added an answer on June 11, 2026 at 5:04 pm

    As long as the classes in the Producer and Consumer projects are declared in the same package as the ObjectModel, it should all just work.

    However, you may want to rethink your design, and provide public accessor methods (getters and setters) in the ObjectModel.

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

Sidebar

Related Questions

I have two classes (MVC view model) which inherits from one abstract base class.
I am using MVC-Viewmodel with repository pattern with EF on my project. I have
In my project, I am using mvc pattern. I do no know which class
I have a basic MVC pattern created in Java that uses the Observable/Observer class/interface.
In an ASP.NET MVC application where I have the following model.. public class EventViewModel
I have a model class similar to the following: using System; using System.Collections.Generic; using
I have a model class that uses a custom validator as shown in following
I have a class that extends the HtmlHelper in MVC and allows me to
Let's say I have a PHP Model-View-Controller framework that maps an address like http://example.com/admin/posts/edit/5
On my ASP.NET MVC 3 project, I have implemented the repository pattern inside a

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.