jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java
changeset 19645 36f707905f2b
parent 16791 fe5141eabb0e
equal deleted inserted replaced
19257:30a1d677a20c 19645:36f707905f2b
     1 /*
     1 /*
     2  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 
    26 
    27 package com.sun.org.glassfish.external.statistics.impl;
    27 package com.sun.org.glassfish.external.statistics.impl;
    28 import com.sun.org.glassfish.external.statistics.Statistic;
    28 import com.sun.org.glassfish.external.statistics.Statistic;
    29 import java.io.Serializable;
    29 import java.lang.reflect.Method;
    30 import java.util.concurrent.atomic.AtomicLong;
    30 import java.lang.reflect.Modifier;
    31 import java.util.Map;
    31 import java.util.Map;
    32 import java.util.concurrent.ConcurrentHashMap;
    32 import java.util.concurrent.ConcurrentHashMap;
    33 
    33 
    34 /**
    34 /**
    35  * @author Sreenivas Munnangi
    35  * @author Sreenivas Munnangi
   131     }
   131     }
   132 
   132 
   133     protected static boolean isValidString(String str) {
   133     protected static boolean isValidString(String str) {
   134         return (str!=null && str.length()>0);
   134         return (str!=null && str.length()>0);
   135     }
   135     }
       
   136 
       
   137     protected void checkMethod(Method method) {
       
   138         if (method == null || method.getDeclaringClass() == null
       
   139                 || !Statistic.class.isAssignableFrom(method.getDeclaringClass())
       
   140                 || Modifier.isStatic(method.getModifiers())) {
       
   141             throw new RuntimeException("Invalid method on invoke");
       
   142         }
       
   143     }
       
   144 
   136 }
   145 }