FileDocCategorySizeDatePackage
AnnotationUtils.javaAPI DocGlassfish v2 API3604Fri May 04 22:30:22 BST 2007com.sun.enterprise.deployment.annotation.impl

AnnotationUtils

public class AnnotationUtils extends Object
Bag for utility methods
author
Jerome Dochez

Fields Summary
private static Logger
logger
private static String
whatToLog
private static ResourceBundle
resourceBundle
Constructors Summary
private AnnotationUtils()
Creates a new instance of AnnotationUtils

    
           
      
        resourceBundle = ResourceBundle.getBundle("LocalStrings");
    
Methods Summary
public static java.lang.StringgetLocalString(java.lang.String key, java.lang.String defaultString, java.lang.Object arguments)

        String value = defaultString;
        if (resourceBundle!=null && resourceBundle.getString(key)!=null){
            value = resourceBundle.getString(key);
        }
        return MessageFormat.format(value, arguments);
    
public static java.util.logging.LoggergetLogger()

        if (logger==null) {
            logger = Logger.global;
        }
        return logger;        
    
public static java.lang.StringgetLoggerTarget()

        return whatToLog;
    
public static voidsetLogger(java.util.logging.Logger lg)

        logger = lg;
    
public static voidsetLoggerTarget(java.lang.String what)

        whatToLog = what;
    
public static booleanshouldLog(java.lang.String what)

        
        if (logger.isLoggable(Level.FINER)) {
            if (whatToLog.indexOf(what)!=-1) 
                return true;
            if ("*".equals(whatToLog))
                return true;
        }
        return false;