Ejemplo n.º 1
0
  @Override
  public ClassNode copyReplaceMethodNode_(final MethodNode _aMethodNode) {
    return this.copy()
        .pvtSetMethods_(
            st.gravel.support.jvm.ArrayExtensions.collect_(
                _methods,
                ((st.gravel.support.jvm.Block1<MethodNode, MethodNode>)
                    (new st.gravel.support.jvm.Block1<MethodNode, MethodNode>() {

                      @Override
                      public MethodNode value_(final MethodNode _each) {
                        if (st.gravel.support.jvm.StringExtensions.equals_(
                            _each.selector(), _aMethodNode.selector())) {
                          return _aMethodNode;
                        } else {
                          return _each;
                        }
                      }
                    }))));
  }
Ejemplo n.º 2
0
  @Override
  public Reference superclassReference() {
    final st.gravel.core.Symbol[] _path;
    if (_superclassPath == null) {
      return null;
    }
    _path =
        st.gravel.support.jvm.ArrayExtensions.collect_(
            st.gravel.support.jvm.StringExtensions.tokensBasedOn_(_superclassPath, '.'),
            ((st.gravel.support.jvm.Block1<st.gravel.core.Symbol, String>)
                (new st.gravel.support.jvm.Block1<st.gravel.core.Symbol, String>() {

                  @Override
                  public st.gravel.core.Symbol value_(final String _str) {
                    return (st.gravel.core.Symbol) st.gravel.core.Symbol.value(_str);
                  }
                })));
    if (st.gravel.support.jvm.IntegerExtensions.equals_(_path.length, 1)) {
      return AbsoluteReference.factory.path_(
          st.gravel.support.jvm.ArrayExtensions.copyWith_(_namespace, _path[0]));
    }
    return AbsoluteReference.factory.path_(_path);
  }
Ejemplo n.º 3
0
  public st.gravel.core.Symbol[] javaClassPath() {
    final Object _temp1 = new Object();
    try {
      final String _javaClass;
      _javaClass =
          ((String)
              st.gravel.support.jvm.DictionaryExtensions.at_ifAbsent_(
                  _properties,
                  "javaClass",
                  ((st.gravel.support.jvm.Block0<String>)
                      (new st.gravel.support.jvm.Block0<String>() {

                        @Override
                        public String value() {
                          throw new NonLocalReturn(null, _temp1);
                        }
                      }))));
      return ((st.gravel.core.Symbol[])
          st.gravel.support.jvm.ArrayExtensions.collect_(
              st.gravel.support.jvm.StringExtensions.tokensBasedOn_(_javaClass, '.'),
              ((st.gravel.support.jvm.Block1<st.gravel.core.Symbol, String>)
                  (new st.gravel.support.jvm.Block1<st.gravel.core.Symbol, String>() {

                    @Override
                    public st.gravel.core.Symbol value_(final String _each) {
                      return (st.gravel.core.Symbol) st.gravel.core.Symbol.value(_each);
                    }
                  }))));
    } catch (NonLocalReturn nlr) {
      if (nlr.marker == _temp1) {
        return (st.gravel.core.Symbol[]) nlr.returnValue;
      } else {
        throw nlr;
      }
    }
  }