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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:17:10+00:00 2026-06-13T15:17:10+00:00

Is there a way (built-in or via plugin) to restrict access to a Java

  • 0

Is there a way (built-in or via plugin) to restrict access to a Java package from other packages in Eclipse?

Example:

Packages (in same project):

com.my.project.common

com.my.project.serviceV1

com.my.project.serviceV2

Now I want to restrict access to serviceV1 and serviceV2 from common. But of course those services should be allowed to access the common package

  • 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-13T15:17:12+00:00Added an answer on June 13, 2026 at 3:17 pm

    Edit: If all you are looking for is simple package level protection that can be achieved using the private/protected/public/default package scopes, then I agree with the comment from @AlexisPigeon – that’s the simplest route. Otherwise, I would consider the jdepend solution I proposed below.

    No, this is not possible. I recommend looking at JDepend. It can produce a report of the package dependencies. You could write a script to parse the output and then fail your build (there are jdepend plugins for maven, ant and gradle) if one of your dependency constraints are violated.

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

Sidebar

Related Questions

Is there a way to alter/create tables in built in air database, other then
Is there a way to get metadata for the Oracle built-in aggeregate and other
Brief: Is there a way to install rabbitmq-plugins via a ubuntu package? Details: I
Is there an easy way (maybe built in solution) to convert TimeSpan to localized
Is there a way to disable the standard built-in function of the Windows-Key (open
Is there any way to replace the WCF service application built-in JavascriptSerializer with Newtonsoft
Is there a way to actively serve Apache's default, built-in 404 page for a
In a large Application is there any way to distinguish user-defined classes with built-in
Scrapy framework has the built-in capability to generate thumbnails. Is there any way to
Is there a built-in way to ensure the endianness of multi-byte types in C++

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.