WrappedMethod.st
author Stefan Vogel <sv@exept.de>
Fri, 28 Jun 1996 17:32:35 +0200
changeset 352 ac12b5bc2754
parent 234 6350e3b2223c
child 508 b9ac899e85c6
permissions -rw-r--r--
Move method's literals form literalArray to indexed instvars.

"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      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.
"

'From Smalltalk/X, Version:2.10.9 on 25-jun-1996 at 22:12:32'                   !

Method subclass:#WrappedMethod
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Methods'
!

!WrappedMethod  class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      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.
"
!

documentation
"
    support for MessageTracer

    [author:]
        Claus Gittinger

    [see also:]
        MessageTracer
"
! !

!WrappedMethod methodsFor:'accessing'!

basicLiterals
    "return my literals"

    ^ super literals

    "Modified: 24.6.1996 / 14:10:34 / stefan"
!

literals
    "return the wrapped methods literals"

    ^ self originalMethod literals
!

methodArgAndVarNames
    "return the names of the args and locals of the wrapped method."

    ^ self originalMethod methodArgAndVarNames
!

methodVarNames
    "return the names of the locals of the wrapped method."

    ^ self originalMethod methodVarNames 
!

numberOfMethodVars
    "return the number of locals in the wrapped method."

    ^ self originalMethod numberOfMethodVars 
!

originalMethod
    "return the method the receiver is wrapping"

    "a kludge: it must be in the literal array somewhere"
    self literalsDo:[:aLiteral |
        aLiteral isMethod ifTrue:[
            ^ aLiteral
        ]
    ].
    ^ nil

    "Modified: 25.6.1996 / 22:08:03 / stefan"
!

source
    "return the wrapped methods source"

    ^ self originalMethod source
! !

!WrappedMethod methodsFor:'queries'!

isWrapped
    "return true, if the receiver is a wrapped method.
     True is returned here, since the receiver is always a wrapped one"

    ^ true
! !

!WrappedMethod  class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic3/WrappedMethod.st,v 1.12 1996-06-28 15:32:35 stefan Exp $'
! !