public SimpleDoubleScoreMapper() throws NoSuchMethodException { super(SimpleDoubleScore.class); SimpleFactoryMapping factoryMapping = new SimpleFactoryMapping(); factoryMapping.setMethod(new JavaReflectionMethod(SimpleDoubleScore.class.getMethod("valueOfUninitialized", int.class, double.class))); factoryMapping.mapParmToIndex("initScore", 0, int.class); factoryMapping.mapParmToIndex("score", 1, double.class); setInstantiationMapping(factoryMapping); addMemberMapping(new ReadMapping("initScore", int.class, "getInitScore")); addMemberMapping(new ReadMapping("score", double.class, "getScore")); } }
do { for (final Method method : type.getDeclaredMethods()) { final JavaReflectionMethod metaMethod = new JavaReflectionMethod(this, method); final String readableMethodDecl = GenUtil.getMethodString(metaMethod); if (!metaMethod.isPrivate() && !method.isBridge() && !processedMethods.contains(readableMethodDecl)) { meths.add(metaMethod); processedMethods.add(readableMethodDecl);
do { for (final Method method : type.getDeclaredMethods()) { final JavaReflectionMethod metaMethod = new JavaReflectionMethod(this, method); final String readableMethodDecl = GenUtil.getMethodString(metaMethod); if (!metaMethod.isPrivate() && !method.isBridge() && !processedMethods.contains(readableMethodDecl)) { meths.add(metaMethod); processedMethods.add(readableMethodDecl);
public SimpleScoreMapper() throws NoSuchMethodException { super(SimpleScore.class); SimpleFactoryMapping factoryMapping = new SimpleFactoryMapping(); factoryMapping.setMethod(new JavaReflectionMethod(SimpleScore.class.getMethod("valueOfUninitialized", int.class, int.class))); factoryMapping.mapParmToIndex("initScore", 0, int.class); factoryMapping.mapParmToIndex("score", 1, int.class); setInstantiationMapping(factoryMapping); addMemberMapping(new ReadMapping("initScore", int.class, "getInitScore")); addMemberMapping(new ReadMapping("score", int.class, "getScore")); } }
public SimpleLongScoreMapper() throws NoSuchMethodException { super(SimpleLongScore.class); SimpleFactoryMapping factoryMapping = new SimpleFactoryMapping(); factoryMapping.setMethod(new JavaReflectionMethod(SimpleLongScore.class.getMethod("valueOfUninitialized", int.class, long.class))); factoryMapping.mapParmToIndex("initScore", 0, int.class); factoryMapping.mapParmToIndex("score", 1, long.class); setInstantiationMapping(factoryMapping); addMemberMapping(new ReadMapping("initScore", int.class, "getInitScore")); addMemberMapping(new ReadMapping("score", long.class, "getScore")); } }
public SimpleBigDecimalScoreMapper() throws NoSuchMethodException { super(SimpleBigDecimalScore.class); SimpleFactoryMapping factoryMapping = new SimpleFactoryMapping(); factoryMapping.setMethod(new JavaReflectionMethod(SimpleBigDecimalScore.class.getMethod("valueOfUninitialized", int.class, BigDecimal.class))); factoryMapping.mapParmToIndex("initScore", 0, int.class); factoryMapping.mapParmToIndex("score", 1, BigDecimal.class); setInstantiationMapping(factoryMapping); addMemberMapping(new ReadMapping("initScore", int.class, "getInitScore")); addMemberMapping(new ReadMapping("score", BigDecimal.class, "getScore")); } }
factoryMapping.setMethod(new JavaReflectionMethod(HardSoftScore.class.getMethod("valueOfUninitialized", int.class, int.class,
factoryMapping.setMethod(new JavaReflectionMethod(BendableBigDecimalScore.class.getMethod("valueOfUninitialized", int.class, BigDecimal[].class,
factoryMapping.setMethod(new JavaReflectionMethod(HardSoftBigDecimalScore.class.getMethod("valueOfUninitialized", int.class, BigDecimal.class,
factoryMapping.setMethod(new JavaReflectionMethod(HardSoftDoubleScore.class.getMethod("valueOfUninitialized", int.class, double.class,
factoryMapping.setMethod(new JavaReflectionMethod(BendableLongScore.class.getMethod("valueOfUninitialized", int.class, long[].class,
factoryMapping.setMethod(new JavaReflectionMethod(HardSoftLongScore.class.getMethod("valueOfUninitialized", int.class, long.class,
factoryMapping.setMethod(new JavaReflectionMethod(BendableScore.class.getMethod("valueOfUninitialized", int.class, int[].class,
factoryMapping.setMethod(new JavaReflectionMethod(HardMediumSoftLongScore.class.getMethod("valueOfUninitialized", int.class, long.class,
factoryMapping.setMethod(new JavaReflectionMethod(HardMediumSoftBigDecimalScore.class.getMethod("valueOfUninitialized", int.class, BigDecimal.class,
factoryMapping.setMethod(new JavaReflectionMethod(HardMediumSoftScore.class.getMethod("valueOfUninitialized", int.class, int.class,
private MetaMethod[] fromMethodArray(final Method[] methods) { final List<MetaMethod> methodList = new ArrayList<>(); for (final Method m : methods) { // hack to exclude jacoco instrumented methods. if (!m.isBridge() && !m.getName().startsWith("$jacoco")) { methodList.add(new JavaReflectionMethod(this, m)); } } return methodList.toArray(new MetaMethod[methodList.size()]); }
private MetaMethod[] fromMethodArray(final Method[] methods) { final List<MetaMethod> methodList = new ArrayList<>(); for (final Method m : methods) { // hack to exclude jacoco instrumented methods. if (!m.isBridge() && !m.getName().startsWith("$jacoco")) { methodList.add(new JavaReflectionMethod(this, m)); } } return methodList.toArray(new MetaMethod[methodList.size()]); }
if (!isReloadable(clazz) && MetaClassFactory.isKnownType(clazz.getName())) { final MetaClass metaClass = MetaClassFactory.get(clazz); result.add(new JavaReflectionMethod(metaClass, m));
if (!isReloadable(clazz) && MetaClassFactory.isKnownType(clazz.getName())) { final MetaClass metaClass = MetaClassFactory.get(clazz); result.add(new JavaReflectionMethod(metaClass, m));