[Nice-commit] Nice/src/nice/tools/code Types.java,1.59,1.60
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-11-06 11:23:24
|
Update of /cvsroot/nice/Nice/src/nice/tools/code In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24364/F:/nice/src/nice/tools/code Modified Files: Types.java Log Message: Check whether a class being extended is visible and make Nice classes public by default. (patch by Luc Perrin) Index: Types.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/Types.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Types.java 30 Jul 2004 19:08:44 -0000 1.59 --- Types.java 6 Nov 2004 11:23:07 -0000 1.60 *************** *** 651,653 **** --- 651,665 ---- Import.reset(); } + + /** + * Test if use of a TypeConstructor is legal within a given package + */ + public static boolean legalAccess(TypeConstructor tc, String packageName ) + { + Type type = get(tc); + if (! (type instanceof ClassType)) + return true; + + return Access.legal((ClassType)type, packageName); + } } |