Java - Hiding update functions in project -


i'm creating simple game engine in java , i've got packages a:

  • game
  • input
  • time
  • graphics

each package handles lot of classes, of them have (and should have) public access. let's focus on 1 important class called mouseinput.

mouseinput class handles public static methods getmouseposition(mouseaxis axis) {...} handles methods updatemouseposition() {...}.

and want make method (updatemouseposition()) callable gamebase class inside game package.

p.s. don't want put classes in 1 package! want separate them don't make project messy.

2th p.s. methods want make callable gamebase static.

it possible restrict can call public method checking call stack. adds code method receiving call "wrong" calls can rejected.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -