/** * Append the string representation of the given object to this sequence. Does nothing if the object is * <code>null</code>. * * @param object * the to-be-appended object. */ public void append(Object object) { append(object, segments.size()); }
/** * Append the given string to this sequence. Does nothing if the string is <code>null</code>. * * @param str * the to-be-appended string. * @since 2.11 */ public void append(String str) { if (str != null) append(str, segments.size()); }
protected CharSequence _generateActionPart(final TemplateText constant, final int position) { StringConcatenation _builder = new StringConcatenation(); _builder.append("<actionPart position=\""); _builder.append(position); _builder.append("\" type=\"TEXT\" value=\""); String _value = constant.getValue(); _builder.append(_value); _builder.append("\" />"); _builder.newLineIfNotEmpty(); return _builder; }
protected String createUri(final String relativePath) { StringConcatenation _builder = new StringConcatenation(); _builder.append("http://localhost:"); int _localPort = this.dropwizardAppRule.getLocalPort(); _builder.append(_localPort); _builder.append("/"); _builder.append(relativePath); return _builder.toString(); } }
public static void notRemoved(final EObject object, final String name) { StringConcatenation _builder = new StringConcatenation(); _builder.append(name); _builder.append(" cannot be null"); Preconditions.checkArgument((object != null), _builder); Resource _eResource = object.eResource(); boolean _tripleNotEquals = (_eResource != null); StringConcatenation _builder_1 = new StringConcatenation(); _builder_1.append(name); _builder_1.append(" cannot be removed"); Preconditions.checkArgument(_tripleNotEquals, _builder_1); }
public static void checkInferredTypeReferences(final String typeName, final TypeReference... types) { for (final TypeReference type : types) { if (((type != null) && type.isInferred())) { StringConcatenation _builder = new StringConcatenation(); _builder.append("Cannot use inferred type as "); _builder.append(typeName); _builder.append("."); throw new IllegalArgumentException(_builder.toString()); } } }
protected String _ebnf2(final AbstractElement it, final AntlrOptions options, final boolean supportActions) { StringConcatenation _builder = new StringConcatenation(); _builder.append("ERROR "); String _name = it.eClass().getName(); _builder.append(_name); _builder.append(" not matched"); return _builder.toString(); }
protected CharSequence associateWithSemanticElement() { StringConcatenation _builder = new StringConcatenation(); _builder.append("associateWithSemanticElement();"); return _builder; }
@Override public String toString() { StringConcatenation _builder = new StringConcatenation(); _builder.append("rootIndentLenght="); _builder.append(this.rootIndentLenght); _builder.newLineIfNotEmpty(); _builder.append(this.leadingText); String _join = IterableExtensions.join(this.lines); _builder.append(_join); _builder.newLineIfNotEmpty(); return _builder.toString(); }
@Override public boolean visit(final CharacterLiteral node) { StringConcatenation _builder = new StringConcatenation(); _builder.append("Character.valueOf("); String _escapedValue = node.getEscapedValue(); _builder.append(_escapedValue); _builder.append(").charValue"); this.appendToBuffer(_builder.toString()); return false; }
public static CharSequence writeTypeDefinition(final TypeDefinition<?> typeDefinition) { StringConcatenation _builder = new StringConcatenation(); _builder.append("type "); QName _qName = typeDefinition.getQName(); String _localName = _qName.getLocalName(); _builder.append(_localName, ""); _builder.append(";"); _builder.newLineIfNotEmpty(); return _builder; }
public static CharSequence writeAnyXmlSchemaNode(final AnyXmlSchemaNode anyXmlSchemaNode) { StringConcatenation _builder = new StringConcatenation(); _builder.append("anyxml "); QName _qName = anyXmlSchemaNode.getQName(); String _localName = _qName.getLocalName(); _builder.append(_localName, ""); _builder.append(";"); _builder.newLineIfNotEmpty(); return _builder; }
protected CharSequence createModelElement(final EObject grammarElement) { StringConcatenation _builder = new StringConcatenation(); _builder.append("createModelElement(grammarAccess."); String _grammarElementAccess = this._grammarAccessExtensions.grammarElementAccess(AntlrGrammarGenUtil.<ParserRule>getOriginalElement(GrammarUtil.containingParserRule(grammarElement))); _builder.append(_grammarElementAccess); _builder.append(")"); return _builder; }
@Override public AnnotationReference newAnnotationReference(final Class<?> annotationClass, final Procedure1<AnnotationReferenceBuildContext> initializer) { AnnotationReference _xblockexpression = null; { StringConcatenation _builder = new StringConcatenation(); _builder.append("annotationClass cannot be null"); Preconditions.checkArgument((annotationClass != null), _builder); _xblockexpression = this.newAnnotationReference(annotationClass.getName(), initializer); } return _xblockexpression; }
@Override protected String _ebnf2(final Group it, final AntlrOptions options, final boolean supportActions) { StringConcatenation _builder = new StringConcatenation(); String _contentAssistRuleName = AntlrGrammarGenUtil.getContentAssistRuleName(GrammarUtil.containingRule(it)); _builder.append(_contentAssistRuleName); _builder.append("__"); String _gaElementIdentifier = this._grammarAccessExtensions.gaElementIdentifier(AntlrGrammarGenUtil.<Group>getOriginalElement(it)); _builder.append(_gaElementIdentifier); _builder.append("__0"); return _builder.toString(); }
private void addWarningForOrphanedJvmElement(final Resource resource, final JvmMember jvmElement, final Severity severity, final IAcceptor<Issue> acceptor) { StringConcatenation _builder = new StringConcatenation(); _builder.append("The generated "); String _uiString = this.getUiString(jvmElement); _builder.append(_uiString); _builder.append(" is not associated with a source element. The producing active annotation should use \'setPrimarySourceElement\'."); EObject _head = IterableExtensions.<EObject>head(resource.getContents()); this.issueFromXtextResourceDiagnostic(new DiagnosticOnFirstKeyword(severity, IssueCodes.ORPHAN_ELMENT, _builder.toString(), _head, null), severity, acceptor); }
protected String _dataTypeEbnf2(final Group it, final boolean supportActions) { StringConcatenation _builder = new StringConcatenation(); { EList<AbstractElement> _elements = it.getElements(); for(final AbstractElement e : _elements) { String _dataTypeEbnf = this.dataTypeEbnf(e, supportActions); _builder.append(_dataTypeEbnf); } } _builder.newLineIfNotEmpty(); return _builder.toString(); }