/** * see 112.3.2. We can't distinguish the bind type, so we just accept anything. * @param test * @return */ int rateBind(MethodDef test) { TypeRef[] prototype = test.getDescriptor().getPrototype(); if (prototype.length == 1 && ServiceReferenceTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1) return 2; if (prototype.length == 2 && MapTR.equals(prototype[1].getFQN())) return 3; return 6; }
/** * see 112.3.2. We can't distinguish the bind type, so we just accept anything. * @param test * @return */ int rateBind(MethodDef test) { TypeRef[] prototype = test.getDescriptor().getPrototype(); if (prototype.length == 1 && ServiceReferenceTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1) return 2; if (prototype.length == 2 && MapTR.equals(prototype[1].getFQN())) return 3; return 6; }
/** * see 112.3.2. We can't distinguish the bind type, so we just accept anything. * @param test * @return */ int rateBind(MethodDef test) { TypeRef[] prototype = test.getDescriptor().getPrototype(); if (prototype.length == 1 && ServiceReferenceTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1) return 2; if (prototype.length == 2 && MapTR.equals(prototype[1].getFQN())) return 3; return 6; }
/** * rates the methods according to the scale in 112.5.8 (compendium 4.3, ds * 1.2), also returning "6" for invalid methods We don't look at return * values yet due to proposal to all them for setting service properties. * * @param test methodDef to examine for suitability as a DS lifecycle method * @param allowedParams TODO * @return rating; 6 if invalid, lower is better */ int rateLifecycle(MethodDef test, Set<String> allowedParams) { TypeRef[] prototype = test.getDescriptor() .getPrototype(); if (prototype.length == 1 && ComponentContextTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1 && BundleContextTR.equals(prototype[0].getFQN())) return 2; if (prototype.length == 1 && MapTR.equals(prototype[0].getFQN())) return 3; if (prototype.length > 1) { for (TypeRef tr : prototype) { if (!allowedParams.contains(tr.getFQN())) return 6; } return 5; } if (prototype.length == 0) return 5; return 6; }
/** * rates the methods according to the scale in 112.5.8 (compendium 4.3, ds 1.2), also returning "6" for invalid methods * We don't look at return values yet due to proposal to all them for setting service properties. * @param test methodDef to examine for suitability as a DS lifecycle method * @param allowedParams TODO * @return rating; 6 if invalid, lower is better */ int rateLifecycle(MethodDef test, Set<String> allowedParams) { TypeRef[] prototype = test.getDescriptor().getPrototype(); if (prototype.length == 1 && ComponentContextTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1 && BundleContextTR.equals(prototype[0].getFQN())) return 2; if (prototype.length == 1 && MapTR.equals(prototype[0].getFQN())) return 3; if (prototype.length > 1) { for (TypeRef tr: prototype) { if (!allowedParams.contains(tr.getFQN())) return 6; } return 5; } if (prototype.length == 0) return 5; return 6; }
/** * rates the methods according to the scale in 112.5.8 (compendium 4.3, ds 1.2), also returning "6" for invalid methods * We don't look at return values yet due to proposal to all them for setting service properties. * @param test methodDef to examine for suitability as a DS lifecycle method * @param allowedParams TODO * @return rating; 6 if invalid, lower is better */ int rateLifecycle(MethodDef test, Set<String> allowedParams) { TypeRef[] prototype = test.getDescriptor().getPrototype(); if (prototype.length == 1 && ComponentContextTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1 && BundleContextTR.equals(prototype[0].getFQN())) return 2; if (prototype.length == 1 && MapTR.equals(prototype[0].getFQN())) return 3; if (prototype.length > 1) { for (TypeRef tr: prototype) { if (!allowedParams.contains(tr.getFQN())) return 6; } return 5; } if (prototype.length == 0) return 5; return 6; }
/** * rates the methods according to the scale in 112.5.8 (compendium 4.3, ds * 1.2), also returning "6" for invalid methods We don't look at return * values yet due to proposal to all them for setting service properties. * * @param test methodDef to examine for suitability as a DS lifecycle method * @param allowedParams TODO * @return rating; 6 if invalid, lower is better */ int rateLifecycle(MethodDef test, Set<String> allowedParams) { TypeRef[] prototype = test.getDescriptor() .getPrototype(); if (prototype.length == 1 && ComponentContextTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1 && BundleContextTR.equals(prototype[0].getFQN())) return 2; if (prototype.length == 1 && MapTR.equals(prototype[0].getFQN())) return 3; if (prototype.length > 1) { for (TypeRef tr : prototype) { if (!allowedParams.contains(tr.getFQN())) return 6; } return 5; } if (prototype.length == 0) return 5; return 6; }
/** * rates the methods according to the scale in 112.5.8 (compendium 4.3, ds 1.2), also returning "6" for invalid methods * We don't look at return values yet due to proposal to all them for setting service properties. * @param test methodDef to examine for suitability as a DS lifecycle method * @param allowedParams TODO * @return rating; 6 if invalid, lower is better */ int rateLifecycle(MethodDef test, Set<String> allowedParams) { TypeRef[] prototype = test.getDescriptor().getPrototype(); if (prototype.length == 1 && ComponentContextTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1 && BundleContextTR.equals(prototype[0].getFQN())) return 2; if (prototype.length == 1 && MapTR.equals(prototype[0].getFQN())) return 3; if (prototype.length > 1) { for (TypeRef tr: prototype) { if (!allowedParams.contains(tr.getFQN())) return 6; } return 5; } if (prototype.length == 0) return 5; return 6; }
/** * see 112.3.2. We can't distinguish the bind type, so we just accept * anything. * * @param test */ int rateBind(MethodDef test) { TypeRef[] prototype = test.getDescriptor() .getPrototype(); if (prototype.length == 1 && ServiceReferenceTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1) return 2; if (prototype.length == 2 && MapTR.equals(prototype[1].getFQN())) return 3; return 6; }
/** * see 112.3.2. We can't distinguish the bind type, so we just accept * anything. * * @param test */ int rateBind(MethodDef test) { TypeRef[] prototype = test.getDescriptor() .getPrototype(); if (prototype.length == 1 && ServiceReferenceTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1) return 2; if (prototype.length == 2 && MapTR.equals(prototype[1].getFQN())) return 3; return 6; }
@Override public TypeRef[] getPrototype() { return descriptor.getPrototype(); }
@Override public TypeRef[] getPrototype() { return descriptor.getPrototype(); } }
@Override public TypeRef[] getPrototype() { return descriptor.getPrototype(); } }
@Override public TypeRef[] getPrototype() { return descriptor.getPrototype(); } }
@Override public TypeRef[] getPrototype() { return descriptor.getPrototype(); }