src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java

changeset 397
b99d7e355d4b
parent 368
0989ad8c0860
child 637
9c07ef4934dd
equal deleted inserted replaced
393:6cdc6ed98780 397:b99d7e355d4b
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 }

mercurial