protected String toProperty(String methodName, JvmFeature feature, int getterParams, int setterParams) { return PropertyUtil.getPropertyName(feature, methodName, getterParams, setterParams); }
protected static String getPropertyName(final JvmOperation operation, final String methodName, final String prefix, final int params) { String _xblockexpression = null; { final int prefixLength = prefix.length(); String _xifexpression = null; if ((PropertyUtil.startsWithPrefix(methodName, prefix, prefixLength) && (operation.getParameters().size() == params))) { _xifexpression = Introspector.decapitalize(methodName.substring(prefixLength)); } _xblockexpression = _xifexpression; } return _xblockexpression; }
protected IScope getAccessorScope(String simpleName, QualifiedName qn, JvmIdentifiableElement feature) { String shorthandName = PropertyUtil.tryGetShorthandName(simpleName); if (shorthandName != null) { List<IEObjectDescription> result = Lists.newArrayListWithCapacity(2); result.add(EObjectDescription.create(shorthandName, feature)); result.add(EObjectDescription.create(qn, feature)); return new SimpleScope(result); } else { return new SingletonScope(EObjectDescription.create(qn, feature), IScope.NULLSCOPE); } }
public static String getPropertyName(final JvmFeature feature, final String methodName, final int getterParams, final int setterParams) { String _xifexpression = null; if ((feature instanceof JvmOperation)) { String _elvis = null; String _elvis_1 = null; String _propertyName = PropertyUtil.getPropertyName(((JvmOperation)feature), methodName, "get", getterParams); if (_propertyName != null) { _elvis_1 = _propertyName; } else { String _propertyName_1 = PropertyUtil.getPropertyName(((JvmOperation)feature), methodName, "set", setterParams); _elvis_1 = _propertyName_1; } if (_elvis_1 != null) { _elvis = _elvis_1; } else { String _propertyName_2 = PropertyUtil.getPropertyName(((JvmOperation)feature), methodName, "is", getterParams); _elvis = _propertyName_2; } _xifexpression = _elvis; } return _xifexpression; }
public static String getPropertyName(final JvmFeature feature) { String _xifexpression = null; boolean _isStatic = feature.isStatic(); if (_isStatic) { _xifexpression = PropertyUtil.getPropertyName(feature, feature.getSimpleName(), 1, 2); } else { _xifexpression = PropertyUtil.getPropertyName(feature, feature.getSimpleName(), 0, 1); } return _xifexpression; }