At one of the university classes we have to develop programs in Java. One of the requirements is to name all our files with pattern surname_firstname_exerciseN_className.java. Another requirement is that we must split our programs into multiple files. As you can imagine, these two don't play well together.
I'm trying to work around this by "translating" my class names. For example, if I write a class named "Something", I do this in my long_prefix_something.java file:
public class long_prefix_something extends Something {}
class Something {
// class code
}
And I want to use class Something in another file. So I do this in that other file:
class Something2 extends long_prefix_something { }
What bothers me, is that I can't translate long_prefix_something back to Something because of circular inheritance error, I have to use Something2 instead.
Is there anyway to overcome this? Any annotation to use or something similar?
abcde_12345_somethingis completely out of Java naming convention. Choosing such Java class names may sometimes incur severe drawbacks.surname.firstname.excerciseNas a package name, which would be visible with thepackagedirective in the file and with the full name in exceptions.