1 /***
2 *
3 * Copyright 2005 LogicBlaze, Inc. http://www.logicblaze.com
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 **/
18 package org.logicblaze.lingo;
19
20 import org.codehaus.backport175.reader.Annotations;
21 import org.logicblaze.lingo.annotations.EndSession;
22 import org.logicblaze.lingo.annotations.OneWay;
23
24 import java.lang.reflect.Method;
25
26 /***
27 * An implementation of {@link MetadataStrategy} which uses the <a
28 * href="http://backport175.codehaus.org/">Backport175</a> library for working
29 * with annotations on Java 1.x and 5 platforms.
30 *
31 * @version $Revision$
32 */
33 public class Backport175MetadataStrategy extends SimpleMetadataStrategy {
34
35 private static final long serialVersionUID = 3266417144621024889L;
36
37 public boolean isRemoteParameter(Method method, Class parameterType, int index) {
38
39 return super.isRemoteParameter(method, parameterType, index);
40 }
41
42 protected boolean isEndSession(Method method) {
43 if (Annotations.isAnnotationPresent(EndSession.class, method)) {
44 return true;
45 }
46 return super.isEndSession(method);
47 }
48
49 protected boolean isOneWayMethod(Method method) {
50 if (Annotations.isAnnotationPresent(OneWay.class, method)) {
51 return true;
52 }
53 return super.isOneWayMethod(method);
54 }
55
56 protected boolean isStateful(Method method) {
57
58 return super.isStateful(method);
59 }
60
61 }