eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SmalltalkChunkFileSourceWriter':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SmalltalkChunkFileSourceWriter


Inheritance:

   Object
   |
   +--AbstractSourceFileWriter
      |
      +--SmalltalkChunkFileSourceWriter
         |
         +--ChangeSet::ClassSourceWriter

Package:
stx:libbasic
Category:
Kernel-Classes-Support
Version:
rev: 1.35 date: 2017/07/05 08:54:12
user: cg
file: SmalltalkChunkFileSourceWriter.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


I know how to write smalltalk chunk file format


Class protocol:

simple API
o  fileOut: aClass on: aStream

o  fileOut: aClass on: aStream withTimeStamp: withTimeStamp withInitialize: initIt withDefinition: withDefinition methodFilter: methodFilter encoder: encoderOrNil

utilities - source code
o  methodTemplate
return a method definition template string

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  methodTemplateForDocumentation
return a method definition template string

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  versionMethodTemplateForCVS
careful to avoid expansion by cvs here!

** This is an obsolete interface - do not use it (it may vanish in future versions) **


Instance protocol:

source writing
o  fileOut: aClass on: outStreamArg withTimeStamp: stampIt withInitialize: initIt withDefinition: withDefinition methodFilter: methodFilter

o  fileOut: aClass on: outStreamArg withTimeStamp: stampIt withInitialize: initIt withDefinition: withDefinition methodFilter: methodFilter encoder: encoderOrNil
file out my definition and all methods onto aStream.
If stampIt is true, a timeStamp comment is prepended.
If initIt is true, and the class implements a class-initialize method,
append a corresponding doIt expression for initialization.
The order by which the fileOut is done is used to put the version method at the end.
Thus, if the version string is expanded (by CVS), the characterPositions of all other methods should not move.
Notice that any extensions version method is NOT written when a project definition is saved;
it is ABSOLUTELY required, that it is saved to the extensions.st file only (because the expanded version string
would be the version string of the project definition file and NOT the version string of the extensions file).
todo: code duplication with JavaScriptSourceFileWriter - please refactor

o  fileOutAllDefinitionsOf: aNonMetaClass on: aStream

o  fileOutAllDefinitionsOf: aNonMetaClass on: aStream withNameSpace: withNameSpacePragma
append expressions on aStream, which defines myself and all of my private classes.

o  fileOutAllMethodsOf: aClass on: aStream methodFilter: methodFilter

o  fileOutCategory: aCategory of: aClass except: skippedMethods only: savedMethods methodFilter: methodFilter on: aStream
file out all methods belonging to aCategory, aString onto aStream.
If skippedMethods is nonNil, those are not saved.
If savedMethods is nonNil, only those are saved.
If both are nil, all are saved. See version-method handling in
fileOut for what this is needed.

o  fileOutCategory: aCategory of: aClass methodFilter: methodFilter on: aStream
file out all methods belonging to aCategory, aString onto aStream

o  fileOutClassCommentOf: aNonMetaClass on: aStream

o  fileOutClassInstVarDefinitionOf: aNonMetaClass on: aStream

o  fileOutCommentEndOn: aStream
Writes a comment end mark on aStream.

o  fileOutCommentLine: aString on: aStream
Writes a single line of comment on a comment to a stream.

o  fileOutCommentStartOn: aStream
Writes a comment start mark on aStream.

o  fileOutDefinitionOf: aNonMetaClass on: aStream

o  fileOutDefinitionOf: aNonMetaClass on: aStream withNameSpace: withNameSpacePragma

o  fileOutMethod: aMethod on: aStream
file a single method onto aStream.

o  fileOutMethods: methods on: stream
JV@2012-09-05: Support for filing out Java extension methods

o  fileOutPackageDefinition: pkg on: aStream

o  generateCallToInitializerFor: aClass on: aStream

o  generateHeaderWithCopyrightOn: outStream
if there is a copyright method, add a copyright comment
at the beginning, taking the string from the copyright method.
We cannot do this unconditionally - that would lead to my copyrights
being put on your code ;-).
On the other hand: I want every file created by myself to have the
copyright string at the beginning be preserved .... even if the
code was edited in the browser and filedOut.

o  generateTimestampOn: outStream



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 15:46:25 GMT