protected ImportingStringConcatenation createImportingStringConcatenation(final SharedAppendableState state, final ITypeReferenceOwner owner) { return new ImportingStringConcatenation(state, owner); }
protected String getStringRepresentation(final Object object) { if (object instanceof JvmType) { return _getStringRepresentation((JvmType)object); } else if (object instanceof Class) { return _getStringRepresentation((Class<?>)object); } else if (object instanceof JvmTypeReference) { return _getStringRepresentation((JvmTypeReference)object); } else if (object instanceof LightweightTypeReference) { return _getStringRepresentation((LightweightTypeReference)object); } else if (object != null) { return _getStringRepresentation(object); } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(object).toString()); } } }
/** * A potentially contained trailing line delimiter is ignored. */ @Override protected List<String> getSignificantContent() { final List<String> result = super.getSignificantContent(); if (((result.size() >= 1) && Objects.equal(this.getLineDelimiter(), IterableExtensions.<String>last(result)))) { int _size = result.size(); int _minus = (_size - 1); return result.subList(0, _minus); } return result; }
/** * @since 2.16 */ protected void appendCompilationTemplate(final ITreeAppendable appendable, final JvmIdentifiableElement it) { boolean _matched = false; if (appendable instanceof TreeAppendable) { _matched=true; SharedAppendableState _state = ((TreeAppendable)appendable).getState(); StandardTypeReferenceOwner _standardTypeReferenceOwner = new StandardTypeReferenceOwner(this.commonServices, it); final ImportingStringConcatenation target = this.createImportingStringConcatenation(_state, _standardTypeReferenceOwner); target.append(this._jvmTypeExtensions.getCompilationTemplate(it)); ((TreeAppendable)appendable).append(target); } if (!_matched) { String _name = appendable.getClass().getName(); String _plus = ("unexpected appendable: " + _name); throw new IllegalStateException(_plus); } }
protected String _getStringRepresentation(final JvmTypeReference object) { final LightweightTypeReference reference = new LightweightTypeReferenceFactory(this.typeReferenceOwner, true).toLightweightReference(object); return this._getStringRepresentation(reference); }