Update of /cvsroot/clirr/clirr/core/src/testinput/testlib-v2/testlib/modifiers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10031/testinput/testlib-v2/testlib/modifiers
Added Files:
EffectivelyFinal.java NonFinalBecomesFinal.java
Log Message:
added test input files
--- NEW FILE ---
package testlib.modifiers;
/**
* Because this class has a package-scope constructor, no subclass of this
* class can ever be created. And because of that, it is not a problem if
* this class is declared "final" in a later version.
* <p>
* Classes with only private constructors are commonly used to implement
* an "enumerated type" in java, as is done here.
*/
public final class EffectivelyFinal
{
int val;
public static final EffectivelyFinal ZERO = new EffectivelyFinal(0);
public static final EffectivelyFinal ONE = new EffectivelyFinal(1);
private EffectivelyFinal(int i)
{
val = i;
}
public int getValue()
{
return val;
}
}
--- NEW FILE ---
package testlib.modifiers;
/**
* It is a binary compatibility error for a non-final class to become
* final in a later version, because users may have created classes which
* are derived from it. Such classes will fail to load with the new version
* of the class present.
*/
public final class NonFinalBecomesFinal
{
}
|