Ejemplo n.º 1
0
 @Override
 public ClassNode selectorsDo_(final st.gravel.support.jvm.Block1<Object, String> _aBlock) {
   for (final MethodNode _m : _methods) {
     _aBlock.value_(_m.selector());
   }
   return this;
 }
Ejemplo n.º 2
0
 @Override
 public ClassNode withMethodNode_(final MethodNode _aMethodNode) {
   final MethodNode _current;
   _current = this.methodOrNilAt_(_aMethodNode.selector());
   if (_current != null) {
     throw new RuntimeException("Duplicate selector: " + _aMethodNode.selector());
   }
   return this.copy()
       .pvtSetMethods_(st.gravel.support.jvm.ArrayExtensions.copyWith_(_methods, _aMethodNode));
 }
Ejemplo n.º 3
0
 public MethodNode[] mergeMethods_with_(
     final MethodNode[] _originalMethods, final MethodNode[] _extensionMethods) {
   final java.util.Set<String>[] _s;
   _s = new java.util.Set[1];
   _s[0] = new java.util.HashSet();
   for (final MethodNode _m : _originalMethods) {
     _s[0].add(_m.selector());
   }
   for (final MethodNode _m : _extensionMethods) {
     if (_s[0].contains(_m.selector())) {
       throw new RuntimeException("Override: " + _m.selector());
     }
   }
   return st.gravel.support.jvm.ArrayExtensions.copyWithAll_(_originalMethods, _extensionMethods);
 }
Ejemplo n.º 4
0
 @Override
 public ClassNode withMethodNode_ofTrait_(
     final MethodNode _aMethodNode, final Reference _aReference) {
   return this.withMethodNode_(_aMethodNode.ofTrait_(_aReference));
 }