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.43 date: 2023/09/08 14:50:59
user: stefan
file: SmalltalkChunkFileSourceWriter.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


I know how to write smalltalk chunk file format

copyright

COPYRIGHT (c) 2004 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

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
(comment from inherited method)
Files out a package definition on the stream, so all subsequent
code entities will be placed in that package

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:59:17 GMT