WrappedMethod.st
author Claus Gittinger <cg@exept.de>
Tue, 16 Apr 1996 11:29:06 +0200
changeset 210 3638d229ce41
parent 68 5f7ac0b5c903
child 234 6350e3b2223c
permissions -rw-r--r--
subclasses of fixed classes are still possible

"
 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.
"

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
"
! !

!WrappedMethod methodsFor:'accessing'!

basicLiterals
    "return my literals"

    ^ literals
!

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"
    literals do:[:aLiteral |
	aLiteral isMethod ifTrue:[
	    ^ aLiteral
	]
    ].
    ^ nil
!

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.10 1996-04-16 09:29:06 cg Exp $'
! !