Examples of AliasEvent


Examples of com.esotericsoftware.yamlbeans.parser.AliasEvent

    String anchor = null;
    if (config.writeConfig.autoAnchor) {
      Integer count = referenceCount.get(object);
      if (count == null) {
        emitter.emit(new AliasEvent(anchoredObjects.get(object)));
        return;
      }
      if (count > 1) {
        referenceCount.remove(object);
        anchor = String.valueOf(nextAnchor++);
View Full Code Here

Examples of com.esotericsoftware.yamlbeans.parser.AliasEvent

    if (!Beans.isScalar(valueClass)) {
      anchor = anchoredObjects.get(object);
      if (config.writeConfig.autoAnchor) {
        Integer count = referenceCount.get(object);
        if (count == null) {
          emitter.emit(new AliasEvent(anchoredObjects.get(object)));
          return;
        }
        if (count > 1) {
          referenceCount.remove(object);
          if (anchor == null) {
View Full Code Here

Examples of org.yaml.snakeyaml.events.AliasEvent

        return this;
    }
   
    @JRubyMethod
    public IRubyObject alias(ThreadContext context, IRubyObject anchor) {
        AliasEvent event = new AliasEvent(anchor.asJavaString(), NULL_MARK, NULL_MARK);
        emit(context, event);
        return this;
    }
View Full Code Here

Examples of org.yaml.snakeyaml.events.AliasEvent

                            context,
                            handler,
                            "end_document",
                            runtime.newBoolean(dee.getExplicit()));
                } else if (event.is(ID.Alias)) {
                    AliasEvent ae = (AliasEvent)event;
                    IRubyObject alias = runtime.getNil();
                    if (ae.getAnchor() != null) {
                        alias = RubyString.newString(runtime, ae.getAnchor());
                    }

                    invoke(
                            context,
                            handler,
View Full Code Here

Examples of org.yaml.snakeyaml.events.AliasEvent

        return this;
    }
   
    @JRubyMethod
    public IRubyObject alias(ThreadContext context, IRubyObject anchor) {
        AliasEvent event = new AliasEvent(anchor.asJavaString(), NULL_MARK, NULL_MARK);
        emit(context, event);
        return this;
    }
View Full Code Here

Examples of org.yaml.snakeyaml.events.AliasEvent

    // node: ALIAS | ANCHOR? TAG? (SCALAR|sequence|mapping)
    private void parseNode() {
        if (scanner.checkToken(Token.ID.Alias)) {
            AliasToken token = (AliasToken) scanner.getToken();
            events.add(new AliasEvent(token.getValue(), null, null));
        } else {
            String anchor = null;
            if (scanner.checkToken(Token.ID.Anchor)) {
                AnchorToken token = (AnchorToken) scanner.getToken();
                anchor = token.getValue();
View Full Code Here

Examples of org.yaml.snakeyaml.events.AliasEvent

                mapping = constructMapping((MappingNode) node);
            }
            String className = node.getTag().getValue().substring(1) + "Event";
            Event value;
            if (className.equals("AliasEvent")) {
                value = new AliasEvent((String) mapping.get("anchor"), null, null);
            } else if (className.equals("ScalarEvent")) {
                String tag = (String) mapping.get("tag");
                String v = (String) mapping.get("value");
                if (v == null) {
                    v = "";
View Full Code Here

Examples of org.yaml.snakeyaml.events.AliasEvent

        return this;
    }
   
    @JRubyMethod
    public IRubyObject alias(ThreadContext context, IRubyObject anchor) {
        AliasEvent event = new AliasEvent(anchor.asJavaString(), NULL_MARK, NULL_MARK);
        emit(context, event);
        return this;
    }
View Full Code Here

Examples of org.yaml.snakeyaml.events.AliasEvent

        if (node.getNodeId() == NodeId.anchor) {
            node = ((AnchorNode) node).getRealNode();
        }
        String tAlias = this.anchors.get(node);
        if (this.serializedNodes.contains(node)) {
            this.emitter.emit(new AliasEvent(tAlias, null, null));
        } else {
            this.serializedNodes.add(node);
            switch (node.getNodeId()) {
            case scalar:
                ScalarNode scalarNode = (ScalarNode) node;
View Full Code Here

Examples of org.yaml.snakeyaml.events.AliasEvent

        Mark startMark = null;
        Mark endMark = null;
        Mark tagMark = null;
        if (scanner.checkToken(Token.ID.Alias)) {
            AliasToken token = (AliasToken) scanner.getToken();
            event = new AliasEvent(token.getValue(), token.getStartMark(), token.getEndMark());
            state = states.pop();
        } else {
            String anchor = null;
            TagTuple tagTokenTag = null;
            if (scanner.checkToken(Token.ID.Anchor)) {
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.