• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ExclusiveRange类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.xtext.xbase.lib.ExclusiveRange的典型用法代码示例。如果您正苦于以下问题:Java ExclusiveRange类的具体用法?Java ExclusiveRange怎么用?Java ExclusiveRange使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ExclusiveRange类属于org.eclipse.xtext.xbase.lib包,在下文中一共展示了ExclusiveRange类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: toTypeReference

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
protected JvmTypeReference toTypeReference(final JvmType type, final int arrayDimensions) {
  if ((type == null)) {
    return null;
  }
  JvmParameterizedTypeReference _createJvmParameterizedTypeReference = TypesFactory.eINSTANCE.createJvmParameterizedTypeReference();
  final Procedure1<JvmParameterizedTypeReference> _function = (JvmParameterizedTypeReference it) -> {
    it.setType(type);
  };
  JvmTypeReference resultTypeRef = ObjectExtensions.<JvmParameterizedTypeReference>operator_doubleArrow(_createJvmParameterizedTypeReference, _function);
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, arrayDimensions, true);
  for (final Integer i : _doubleDotLessThan) {
    {
      final JvmGenericArrayTypeReference arrayRef = TypesFactory.eINSTANCE.createJvmGenericArrayTypeReference();
      arrayRef.setComponentType(resultTypeRef);
      resultTypeRef = arrayRef;
    }
  }
  return resultTypeRef;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:20,代码来源:AbstractConstantExpressionsInterpreter.java


示例2: readExternal

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
  this.setURI(SerializationExtensions.readURI(in));
  final int descriptionsSize = in.readInt();
  ArrayList<SerializableEObjectDescription> _arrayList = new ArrayList<SerializableEObjectDescription>(descriptionsSize);
  this.descriptions = _arrayList;
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, descriptionsSize, true);
  for (final Integer i : _doubleDotLessThan) {
    this.descriptions.add(SerializationExtensions.<SerializableEObjectDescription>readCastedObject(in));
  }
  final int referencesSize = in.readInt();
  ArrayList<SerializableReferenceDescription> _arrayList_1 = new ArrayList<SerializableReferenceDescription>(referencesSize);
  this.references = _arrayList_1;
  ExclusiveRange _doubleDotLessThan_1 = new ExclusiveRange(0, referencesSize, true);
  for (final Integer i_1 : _doubleDotLessThan_1) {
    this.references.add(SerializationExtensions.<SerializableReferenceDescription>readCastedObject(in));
  }
  final int importedNamesSize = in.readInt();
  ArrayList<QualifiedName> _arrayList_2 = new ArrayList<QualifiedName>(importedNamesSize);
  this.importedNames = _arrayList_2;
  ExclusiveRange _doubleDotLessThan_2 = new ExclusiveRange(0, importedNamesSize, true);
  for (final Integer i_2 : _doubleDotLessThan_2) {
    this.importedNames.add(SerializationExtensions.readQualifiedName(in));
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:26,代码来源:SerializableResourceDescription.java


示例3: readExternal

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
  final int numChunks = in.readInt();
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, numChunks, true);
  for (final Integer i : _doubleDotLessThan) {
    {
      final String chunkName = in.readUTF();
      final int numDescriptions = in.readInt();
      final ArrayList<IResourceDescription> descriptions = new ArrayList<IResourceDescription>(numDescriptions);
      ExclusiveRange _doubleDotLessThan_1 = new ExclusiveRange(0, numDescriptions, true);
      for (final Integer j : _doubleDotLessThan_1) {
        Object _readObject = in.readObject();
        descriptions.add(((IResourceDescription) _readObject));
      }
      ResourceDescriptionsData _resourceDescriptionsData = new ResourceDescriptionsData(descriptions);
      this.chunk2resourceDescriptions.put(chunkName, _resourceDescriptionsData);
    }
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:20,代码来源:ChunkedResourceDescriptions.java


示例4: readExternal

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
  final int numEntries = in.readInt();
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, numEntries, true);
  for (final Integer i : _doubleDotLessThan) {
    {
      final URI source = URI.createURI(in.readUTF());
      final int numGenerated = in.readInt();
      ExclusiveRange _doubleDotLessThan_1 = new ExclusiveRange(0, numGenerated, true);
      for (final Integer j : _doubleDotLessThan_1) {
        {
          final URI generated = URI.createURI(in.readUTF());
          final String outputConfig = in.readUTF();
          this.addSource2Generated(source, generated, outputConfig);
        }
      }
    }
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:20,代码来源:Source2GeneratedMapping.java


示例5: someCodeGen

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
private StringConcatenationClient someCodeGen(final int n) {
  StringConcatenationClient _client = new StringConcatenationClient() {
    @Override
    protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
      {
        ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, n, true);
        for(final Integer i : _doubleDotLessThan) {
          _builder.append("before ");
          CompositeGeneratorNode _append = GeneratorNodeTest.this.exts.append(GeneratorNodeTest.this.exts.trace(GeneratorNodeTest.this.loc((10 + (i).intValue()))), "Hello");
          _builder.append(_append);
          _builder.append(" after");
          _builder.newLineIfNotEmpty();
          _builder.append("  ");
          StringConcatenationClient _someCodeGen = GeneratorNodeTest.this.someCodeGen((n - 1));
          _builder.append(_someCodeGen, "  ");
          _builder.newLineIfNotEmpty();
        }
      }
    }
  };
  return _client;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:23,代码来源:GeneratorNodeTest.java


示例6: someCodeGen_noTrace

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
private String someCodeGen_noTrace(final int n) {
  StringConcatenation _builder = new StringConcatenation();
  {
    ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, n, true);
    for(final Integer i : _doubleDotLessThan) {
      _builder.append("before ");
      _builder.append("Hello");
      _builder.append(" after");
      _builder.newLineIfNotEmpty();
      _builder.append("  ");
      String _someCodeGen_noTrace = this.someCodeGen_noTrace((n - 1));
      _builder.append(_someCodeGen_noTrace, "  ");
      _builder.newLineIfNotEmpty();
    }
  }
  return _builder.toString();
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:18,代码来源:GeneratorNodeTest.java


示例7: testLongInputManyTasks

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
@Test
public void testLongInputManyTasks() {
  final int expectation = 100000;
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("/*");
  _builder.newLine();
  {
    IntegerRange _upTo = new IntegerRange(1, expectation);
    for(final Integer i : _upTo) {
      _builder.append(" ");
      _builder.append("* FIXME this cannot work");
      _builder.newLine();
    }
  }
  _builder.append(" ");
  _builder.append("*/");
  _builder.newLine();
  final String source = _builder.toString();
  final List<Task> parsed = this.parser.parseTasks(LineDelimiters.toUnix(source), this.definitions);
  Assert.assertEquals(expectation, parsed.size());
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, expectation, true);
  for (final Integer i_1 : _doubleDotLessThan) {
    Assert.assertEquals(((i_1).intValue() + 2), parsed.get((i_1).intValue()).getLineNumber());
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:26,代码来源:DefaultTaskParserTest.java


示例8: getJointTransformations

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
public List<Pair<String, RelativeTransformation>> getJointTransformations() {
  boolean _equals = Objects.equal(this.allTransformations, null);
  if (_equals) {
    LinkedList<Pair<String, RelativeTransformation>> _linkedList = new LinkedList<Pair<String, RelativeTransformation>>(this.jointTransformations);
    this.allTransformations = _linkedList;
    this.allTransformations.addAll(this.constraintTransformations);
    List<Pair<String, List<JointMovement>>> _states = this.getStates();
    int _size = _states.size();
    int _size_1 = this.allTransformations.size();
    int _minus = (_size - _size_1);
    ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _minus, true);
    final Consumer<Integer> _function = new Consumer<Integer>() {
      @Override
      public void accept(final Integer it) {
        ConnectiveTreeBuilder.this.allTransformations.add(null);
      }
    };
    _doubleDotLessThan.forEach(_function);
  }
  return this.allTransformations;
}
 
开发者ID:szschaler,项目名称:RigidBodies,代码行数:22,代码来源:ConnectiveTreeBuilder.java


示例9: schedule

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
public StringBuilder schedule(final List<Integer> threadLoad, final List<StringBuilder> threadExecution, final int costs, final CharSequence execution) {
  StringBuilder _xblockexpression = null;
  {
    int min = Integer.MAX_VALUE;
    int tid = (-1);
    int _size = threadLoad.size();
    ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true);
    for (final Integer i : _doubleDotLessThan) {
      {
        final Integer load = threadLoad.get((i).intValue());
        if (((load).intValue() <= min)) {
          min = (load).intValue();
          tid = (i).intValue();
        }
      }
    }
    Integer _get = threadLoad.get(tid);
    int _plus = ((_get).intValue() + costs);
    threadLoad.set(tid, Integer.valueOf(_plus));
    _xblockexpression = threadExecution.get(tid).append(execution);
  }
  return _xblockexpression;
}
 
开发者ID:pshdl,项目名称:org.pshdl,代码行数:24,代码来源:JavaCodeGenerator.java


示例10: testContent

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
@Test
public void testContent() {
  Assert.assertEquals("1,2,3,4", IterableExtensions.join(new ExclusiveRange(1, 5, true), ","));
  Assert.assertEquals("", IterableExtensions.join(new ExclusiveRange(0, 0, true), ","));
  Assert.assertEquals("", IterableExtensions.join(new ExclusiveRange(0, (-1), true), ","));
  Assert.assertEquals("-1", IterableExtensions.join(new ExclusiveRange((-1), 0, true), ","));
  Assert.assertEquals("4,3,2,1", IterableExtensions.join(new ExclusiveRange(5, 1, false), ","));
  Assert.assertEquals("", IterableExtensions.join(new ExclusiveRange(0, 0, false), ","));
  Assert.assertEquals("", IterableExtensions.join(new ExclusiveRange((-1), 0, false), ","));
  Assert.assertEquals("-1", IterableExtensions.join(new ExclusiveRange(0, (-1), false), ","));
}
 
开发者ID:eclipse,项目名称:xtext-lib,代码行数:12,代码来源:ExclusiveRangeTest.java


示例11: testSize

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
@Test
public void testSize() {
  Assert.assertEquals(4, new ExclusiveRange(1, 5, true).size());
  Assert.assertEquals(0, new ExclusiveRange(0, 0, true).size());
  Assert.assertEquals(0, new ExclusiveRange(0, (-1), true).size());
  Assert.assertEquals(1, new ExclusiveRange((-1), 0, true).size());
  Assert.assertEquals(4, new ExclusiveRange(5, 1, false).size());
  Assert.assertEquals(0, new ExclusiveRange(0, 0, false).size());
  Assert.assertEquals(0, new ExclusiveRange((-1), 0, false).size());
  Assert.assertEquals(1, new ExclusiveRange(0, (-1), false).size());
}
 
开发者ID:eclipse,项目名称:xtext-lib,代码行数:12,代码来源:ExclusiveRangeTest.java


示例12: testIsEmpty

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
@Test
public void testIsEmpty() {
  Assert.assertFalse(new ExclusiveRange(1, 5, true).isEmpty());
  Assert.assertTrue(new ExclusiveRange(0, 0, true).isEmpty());
  Assert.assertTrue(new ExclusiveRange(0, (-1), true).isEmpty());
  Assert.assertFalse(new ExclusiveRange((-1), 0, true).isEmpty());
  Assert.assertFalse(new ExclusiveRange(5, 1, false).isEmpty());
  Assert.assertTrue(new ExclusiveRange(0, 0, false).isEmpty());
  Assert.assertTrue(new ExclusiveRange((-1), 0, false).isEmpty());
  Assert.assertFalse(new ExclusiveRange(0, (-1), false).isEmpty());
}
 
开发者ID:eclipse,项目名称:xtext-lib,代码行数:12,代码来源:ExclusiveRangeTest.java


示例13: testContains

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
@Test
public void testContains() {
  Assert.assertFalse(new ExclusiveRange(1, 5, true).contains(0));
  Assert.assertTrue(new ExclusiveRange(1, 5, true).contains(1));
  Assert.assertTrue(new ExclusiveRange(1, 5, true).contains(2));
  Assert.assertTrue(new ExclusiveRange(1, 5, true).contains(3));
  Assert.assertTrue(new ExclusiveRange(1, 5, true).contains(4));
  Assert.assertFalse(new ExclusiveRange(1, 5, true).contains(5));
  Assert.assertFalse(new ExclusiveRange(0, 0, true).contains(0));
  Assert.assertFalse(new ExclusiveRange(0, (-1), true).contains(0));
  Assert.assertFalse(new ExclusiveRange(0, (-1), true).contains((-1)));
  Assert.assertFalse(new ExclusiveRange((-1), 0, true).contains((-2)));
  Assert.assertTrue(new ExclusiveRange((-1), 0, true).contains((-1)));
  Assert.assertFalse(new ExclusiveRange((-1), 0, true).contains((-0)));
  Assert.assertFalse(new ExclusiveRange(5, 1, false).contains(0));
  Assert.assertTrue(new ExclusiveRange(5, 1, false).contains(1));
  Assert.assertTrue(new ExclusiveRange(5, 1, false).contains(2));
  Assert.assertTrue(new ExclusiveRange(5, 1, false).contains(3));
  Assert.assertTrue(new ExclusiveRange(5, 1, false).contains(4));
  Assert.assertFalse(new ExclusiveRange(5, 1, false).contains(5));
  Assert.assertFalse(new ExclusiveRange(0, 0, false).contains(0));
  Assert.assertFalse(new ExclusiveRange((-1), 0, false).contains(0));
  Assert.assertFalse(new ExclusiveRange((-1), 0, false).contains((-1)));
  Assert.assertFalse(new ExclusiveRange(0, (-1), false).contains((-2)));
  Assert.assertTrue(new ExclusiveRange(0, (-1), false).contains((-1)));
  Assert.assertFalse(new ExclusiveRange(0, (-1), false).contains((-0)));
}
 
开发者ID:eclipse,项目名称:xtext-lib,代码行数:28,代码来源:ExclusiveRangeTest.java


示例14: parseTags

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
public static List<TaskTag> parseTags(final String names, final String priorities) {
  final Splitter splitter = Splitter.on(",").omitEmptyStrings().trimResults();
  final List<String> tags = IterableExtensions.<String>toList(splitter.split(names));
  final List<String> prios = IterableExtensions.<String>toList(splitter.split(priorities));
  final ArrayList<TaskTag> elements = CollectionLiterals.<TaskTag>newArrayList();
  int _size = tags.size();
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true);
  for (final Integer i : _doubleDotLessThan) {
    TaskTag _taskTag = new TaskTag();
    final Procedure1<TaskTag> _function = (TaskTag it) -> {
      it.setName(tags.get((i).intValue()));
      Priority _xifexpression = null;
      int _size_1 = prios.size();
      boolean _greaterEqualsThan = (_size_1 >= (i).intValue());
      if (_greaterEqualsThan) {
        Priority _xtrycatchfinallyexpression = null;
        try {
          _xtrycatchfinallyexpression = Priority.valueOf(prios.get((i).intValue()));
        } catch (final Throwable _t) {
          if (_t instanceof IllegalArgumentException) {
            _xtrycatchfinallyexpression = Priority.NORMAL;
          } else {
            throw Exceptions.sneakyThrow(_t);
          }
        }
        _xifexpression = _xtrycatchfinallyexpression;
      } else {
        _xifexpression = Priority.NORMAL;
      }
      it.setPriority(_xifexpression);
    };
    TaskTag _doubleArrow = ObjectExtensions.<TaskTag>operator_doubleArrow(_taskTag, _function);
    elements.add(_doubleArrow);
  }
  return elements;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:37,代码来源:PreferenceTaskTagProvider.java


示例15: assertContainsTasks

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
private void assertContainsTasks(final Resource resource, final List<Task> expectedTasks) {
  final List<Task> actualTasks = this.finder.findTasks(resource);
  Assert.assertEquals(expectedTasks.size(), actualTasks.size());
  int _size = expectedTasks.size();
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true);
  for (final Integer i : _doubleDotLessThan) {
    TaskAssert.assertExactMatch(expectedTasks.get((i).intValue()), actualTasks.get((i).intValue()));
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:10,代码来源:DefaultTaskFinderTest.java


示例16: assertContainsTasks

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
private void assertContainsTasks(final CharSequence source, final List<Task> expectedTasks) {
  final List<Task> actualTasks = this.parser.parseTasks(LineDelimiters.toUnix(source.toString()), this.definitions);
  Assert.assertEquals(expectedTasks.size(), actualTasks.size());
  int _size = expectedTasks.size();
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true);
  for (final Integer i : _doubleDotLessThan) {
    TaskAssert.assertExactMatch(expectedTasks.get((i).intValue()), actualTasks.get((i).intValue()));
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:10,代码来源:DefaultTaskParserTest.java


示例17: assertDescriptionsEqual

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
public void assertDescriptionsEqual(final SerializableResourceDescription before, final SerializableResourceDescription after) {
  Assert.assertEquals(before.getURI(), after.getURI());
  Assert.assertEquals(before.getImportedNames(), after.getImportedNames());
  Assert.assertEquals(before.getReferences().size(), after.getReferences().size());
  int _size = before.getReferences().size();
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true);
  for (final int i : _doubleDotLessThan) {
    {
      final SerializableReferenceDescription beforeRef = before.getReferences().get(i);
      final SerializableReferenceDescription afterRef = after.getReferences().get(i);
      Assert.assertEquals(beforeRef.getContainerEObjectURI(), afterRef.getContainerEObjectURI());
      Assert.assertEquals(beforeRef.getSourceEObjectUri(), afterRef.getSourceEObjectUri());
      Assert.assertEquals(beforeRef.getTargetEObjectUri(), afterRef.getTargetEObjectUri());
      Assert.assertEquals(beforeRef.getEReference(), afterRef.getEReference());
      Assert.assertEquals(beforeRef.getIndexInList(), afterRef.getIndexInList());
    }
  }
  Assert.assertEquals(before.getDescriptions().size(), after.getDescriptions().size());
  int _size_1 = before.getDescriptions().size();
  ExclusiveRange _doubleDotLessThan_1 = new ExclusiveRange(0, _size_1, true);
  for (final int i_1 : _doubleDotLessThan_1) {
    {
      final SerializableEObjectDescription beforeDesc = before.getDescriptions().get(i_1);
      final SerializableEObjectDescription afterDesc = after.getDescriptions().get(i_1);
      Assert.assertEquals(beforeDesc.getEClass(), afterDesc.getEClass());
      Assert.assertEquals(beforeDesc.getName(), afterDesc.getName());
      Assert.assertEquals(beforeDesc.qualifiedName, afterDesc.qualifiedName);
      Assert.assertEquals(beforeDesc.userData, afterDesc.userData);
      Assert.assertEquals(beforeDesc.getEObjectURI(), afterDesc.getEObjectURI());
    }
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:33,代码来源:SerializableResourceDescriptionTest.java


示例18: getMaxJRows

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
public Integer getMaxJRows(final ConnectiveTreeBuilder ctb) {
  List<Pair<String, List<JointMovement>>> _states = ctb.getStates();
  int _size = _states.size();
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true);
  final Function2<Integer, Integer, Integer> _function = new Function2<Integer, Integer, Integer>() {
    @Override
    public Integer apply(final Integer acc, final Integer idx) {
      int _rowNumForState = RigidBodiesGenerator.this.getRowNumForState(ctb, (idx).intValue());
      return Integer.valueOf(Math.max((acc).intValue(), _rowNumForState));
    }
  };
  return IterableExtensions.<Integer, Integer>fold(_doubleDotLessThan, Integer.valueOf(1), _function);
}
 
开发者ID:szschaler,项目名称:RigidBodies,代码行数:14,代码来源:RigidBodiesGenerator.java


示例19: CommonCompilerExtension

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
public CommonCompilerExtension(final ExecutableModel em, final int bitWidth) {
  this.em = em;
  int _length = em.variables.length;
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _length, true);
  for (final Integer i : _doubleDotLessThan) {
    this.varIdx.put(em.variables[(i).intValue()].name, i);
  }
}
 
开发者ID:pshdl,项目名称:org.pshdl,代码行数:9,代码来源:CommonCompilerExtension.java


示例20: doTransform

import org.eclipse.xtext.xbase.lib.ExclusiveRange; //导入依赖的package包/类
public void doTransform(final List<? extends MutableMethodDeclaration> methods, @Extension final TransformationContext context) {
  int _size = methods.size();
  ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true);
  for (final Integer i : _doubleDotLessThan) {
    {
      final MutableMethodDeclaration it = methods.get((i).intValue());
      List<MutableParameterDeclaration> _parameters = it.getParameters();
      int _size_1 = _parameters.size();
      final int _switchValue = _size_1;
      boolean _matched = false;
      if (!_matched) {
        if (Objects.equal(_switchValue,0)) {
          _matched=true;
          ParamterlessMethodMemoizer _paramterlessMethodMemoizer = new ParamterlessMethodMemoizer(it, context, (i).intValue());
          _paramterlessMethodMemoizer.generate();
        }
      }
      if (!_matched) {
        if (Objects.equal(_switchValue,1)) {
          _matched=true;
          SingleParameterMethodMemoizer _singleParameterMethodMemoizer = new SingleParameterMethodMemoizer(it, context, (i).intValue());
          _singleParameterMethodMemoizer.generate();
        }
      }
      if (!_matched) {
        MultipleParameterMethodMemoizer _multipleParameterMethodMemoizer = new MultipleParameterMethodMemoizer(it, context, (i).intValue());
        _multipleParameterMethodMemoizer.generate();
      }
    }
  }
}
 
开发者ID:damien-cremilleux,项目名称:TP4INFO,代码行数:32,代码来源:MemoizeProcessor.java



注:本文中的org.eclipse.xtext.xbase.lib.ExclusiveRange类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EntityHanging类代码示例发布时间:2022-05-22
下一篇:
Java User类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap