Z
z-man
Hi all
Is there a way to emulate the (cross-package) assembly access modifier
"internal" of C#?
I need to let some classes *within* the same assembly (you know: the
same JAR) to cooperate, despite belonging to distinct (yet omogeneous)
packages, the way it's achieved in C# assemblies using the "internal"
modifier.
This is an example:
package myProject.util;
import myProject.core.*;
public class Widget{
...
Proof proof = new Proof();
// Should call across the packages...
proof.setTitle("You method work, don't you?");
}
package myProject.core;
public class Proof
{
public String getTitle(){...}
// This is problematic...
void setTitle(String value){...}
}
Thank you for your advise!
Is there a way to emulate the (cross-package) assembly access modifier
"internal" of C#?
I need to let some classes *within* the same assembly (you know: the
same JAR) to cooperate, despite belonging to distinct (yet omogeneous)
packages, the way it's achieved in C# assemblies using the "internal"
modifier.
This is an example:
package myProject.util;
import myProject.core.*;
public class Widget{
...
Proof proof = new Proof();
// Should call across the packages...
proof.setTitle("You method work, don't you?");
}
package myProject.core;
public class Proof
{
public String getTitle(){...}
// This is problematic...
void setTitle(String value){...}
}
Thank you for your advise!