Examples of ContainerType


Examples of ch.njol.skript.util.Container.ContainerType

 
  public <T> Loop(final Expression<?> expr, final SectionNode node) {
    assert expr != null;
    assert node != null;
    if (Container.class.isAssignableFrom(expr.getReturnType())) {
      final ContainerType type = expr.getReturnType().getAnnotation(ContainerType.class);
      if (type == null)
        throw new SkriptAPIException(expr.getReturnType().getName() + " implements Container but is missing the required @ContainerType annotation");
      this.expr = new ContainerExpression(expr, type.value());
    } else {
      this.expr = expr;
    }
    ScriptLoader.currentSections.add(this);
    ScriptLoader.currentLoops.add(this);
View Full Code Here

Examples of com.proofpoint.event.client.EventFieldMetadata.ContainerType

            // allow accessing public methods in private event classes
            method.setAccessible(true);

            Class<?> dataType = method.getReturnType();
            ContainerType containerType = null;

            // extract container type and replace data type with it
            if (isIterable(dataType)) {
                dataType = extractIterableType(method);
                containerType = ContainerType.ITERABLE;
View Full Code Here

Examples of io.airlift.event.client.EventFieldMetadata.ContainerType

            // allow accessing public methods in private event classes
            method.setAccessible(true);

            Class<?> dataType = method.getReturnType();
            ContainerType containerType = null;

            // extract container type and replace data type with it
            if (isIterable(dataType)) {
                dataType = extractIterableType(method);
                containerType = ContainerType.ITERABLE;
View Full Code Here

Examples of my.home.dsl.deepClone.ContainerType

   * Every member field must be defined once in its parent container
   * @param fieldCloner
   */
  @Check
  public void checkFieldUniquity(FieldClonerType fieldCloner) {
    ContainerType parentContainer = ((ContainerType)fieldCloner.eContainer());
    List<FieldClonerType> declaredfields = parentContainer.getFields();
    int uniquityCounter = 0;
    for (FieldClonerType otherField : declaredfields) {
      if (otherField.getFieldName().equals(fieldCloner.getFieldName())) uniquityCounter++;
      if (uniquityCounter>1) {
        error("Field " + fieldCloner.getFieldName() + " is declared more then once in container " + dcUtils.getNodeQualifiedName(parentContainer),
View Full Code Here

Examples of my.home.dsl.deepClone.ContainerType

      _builder.newLine();
      final String sample = _builder.toString();
      final Model model = this.parser.parse(sample);
      EList<ClassCloner> _cloners = ((Body) model).getCloners();
      ClassCloner _get = _cloners.get(0);
      final ContainerType cloner = this._deepCloneUtils.asContainer(_get);
      ArrayList<String> _newArrayList = CollectionLiterals.<String>newArrayList("paragraph");
      this._deepCloneUtils.addFields(cloner, _newArrayList);
      final String result = this._iSerializer.serialize(model);
      StringConcatenation _builder_1 = new StringConcatenation();
      _builder_1.append("deepClone");
View Full Code Here

Examples of my.home.dsl.deepClone.ContainerType

      _builder.newLine();
      final String sample = _builder.toString();
      final Model model = this.parser.parse(sample);
      EList<ClassCloner> _cloners = ((Body) model).getCloners();
      ClassCloner _get = _cloners.get(0);
      final ContainerType cloner = this._deepCloneUtils.asContainer(_get);
      ArrayList<String> _newArrayList = CollectionLiterals.<String>newArrayList("paragraph");
      this._deepCloneUtils.addFields(cloner, _newArrayList);
      SaveOptions.Builder _newBuilder = SaveOptions.newBuilder();
      SaveOptions.Builder _format = _newBuilder.format();
      SaveOptions _options = _format.getOptions();
View Full Code Here

Examples of my.home.dsl.deepClone.ContainerType

      _builder_1.append("[author, name]");
      final String expectedMissingFieldNamesForBookCloner = _builder_1.toString();
      final Model model = this.parser.parse(sample);
      EList<ClassCloner> _cloners = ((Body) model).getCloners();
      ClassCloner _get = _cloners.get(0);
      final ContainerType cloner = this._deepCloneUtils.asContainer(_get);
      final Set<String> missingFieldNamesSet = this._deepCloneUtils.findMissingFieldsInContainerElement(cloner);
      String _string = expectedMissingFieldNamesForBookCloner.toString();
      List<String> _sort = IterableExtensions.<String>sort(missingFieldNamesSet);
      Object[] _array = _sort.toArray();
      String _string_1 = ((List<Object>)Conversions.doWrapArray(_array)).toString();
View Full Code Here

Examples of my.home.dsl.deepClone.ContainerType

      _builder_1.append("[section]");
      final String expectedMissingFieldNamesForBookCloner = _builder_1.toString();
      final Model model = this.parser.parse(sample);
      EList<ClassCloner> _cloners = ((Body) model).getCloners();
      ClassCloner _get = _cloners.get(0);
      final ContainerType cloner = this._deepCloneUtils.asContainer(_get);
      final Set<String> missingFieldNamesSet = this._deepCloneUtils.findMissingFieldsInContainerElement(cloner);
      String _string = expectedMissingFieldNamesForBookCloner.toString();
      List<String> _sort = IterableExtensions.<String>sort(missingFieldNamesSet);
      Object[] _array = _sort.toArray();
      String _string_1 = ((List<Object>)Conversions.doWrapArray(_array)).toString();
View Full Code Here

Examples of my.home.dsl.deepClone.ContainerType

      _builder_1.append("[description, name, paragraph]");
      final String expectedMissingFieldNamesForSectionElement = _builder_1.toString();
      final Model model = this.parser.parse(sample);
      EList<ClassCloner> _cloners = ((Body) model).getCloners();
      ClassCloner _get = _cloners.get(0);
      final ContainerType cloner = this._deepCloneUtils.asContainer(_get);
      EList<FieldClonerType> _fields = cloner.getFields();
      final Function1<FieldClonerType,Boolean> _function = new Function1<FieldClonerType,Boolean>() {
        public Boolean apply(final FieldClonerType it) {
          String _fieldName = it.getFieldName();
          boolean _equals = Objects.equal(_fieldName, "section");
          return Boolean.valueOf(_equals);
        }
      };
      FieldClonerType _findFirst = IterableExtensions.<FieldClonerType>findFirst(_fields, _function);
      final ContainerType section = this._deepCloneUtils.asContainer(_findFirst);
      final Set<String> missingFieldNamesInSection = this._deepCloneUtils.findMissingFieldsInContainerElement(section);
      String _string = expectedMissingFieldNamesForSectionElement.toString();
      List<String> _sort = IterableExtensions.<String>sort(missingFieldNamesInSection);
      Object[] _array = _sort.toArray();
      String _string_1 = ((List<Object>)Conversions.doWrapArray(_array)).toString();
View Full Code Here

Examples of my.home.dsl.deepClone.ContainerType

      _builder_1.append("[]");
      final String expectedMissingFieldNamesForFooFooElement = _builder_1.toString();
      final Model model = this.parser.parse(sample);
      EList<ClassCloner> _cloners = ((Body) model).getCloners();
      ClassCloner _get = _cloners.get(0);
      final ContainerType cloner = this._deepCloneUtils.asContainer(_get);
      EList<FieldClonerType> _fields = cloner.getFields();
      final Function1<FieldClonerType,Boolean> _function = new Function1<FieldClonerType,Boolean>() {
        public Boolean apply(final FieldClonerType it) {
          String _fieldName = it.getFieldName();
          boolean _equals = Objects.equal(_fieldName, "fooFoo");
          return Boolean.valueOf(_equals);
        }
      };
      FieldClonerType _findFirst = IterableExtensions.<FieldClonerType>findFirst(_fields, _function);
      final ContainerType fooFoo = this._deepCloneUtils.asContainer(_findFirst);
      final Set<String> missingFieldNamesInSection = this._deepCloneUtils.findMissingFieldsInContainerElement(fooFoo);
      String _string = expectedMissingFieldNamesForFooFooElement.toString();
      List<String> _sort = IterableExtensions.<String>sort(missingFieldNamesInSection);
      Object[] _array = _sort.toArray();
      String _string_1 = ((List<Object>)Conversions.doWrapArray(_array)).toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.