JavaField.st
author cg
Fri, 22 Nov 2002 20:14:07 +0000
changeset 713 75e92ac63bf1
parent 593 8e713803c6e6
child 744 8cbe20f2a6f4
permissions -rw-r--r--
category change

"
 COPYRIGHT (c) 1997 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.
"



"{ Package: 'stx:libjava' }"

JavaRef subclass:#JavaField
	instanceVariableNames:'accessFlags name signature constantValue'
	classVariableNames:'A_FINAL A_PRIVATE A_PROTECTED A_PUBLIC A_STATIC A_TRANSIENT
		A_VOLATILE A_SMALLTALK'
	poolDictionaries:''
	category:'Languages-Java-Reader-Support'
!

!JavaField class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1997 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.
"


! !

!JavaField class methodsFor:'class initialization'!

initialize
    A_PUBLIC    := 16r0001. "/ JavaClass A_PUBLIC
    A_PRIVATE   := 16r0002.
    A_PROTECTED := 16r0004.
    A_STATIC    := 16r0008.
    A_FINAL     := 16r0010. "/ JavaClass A_FINAL
    A_VOLATILE  := 16r0040.
    A_TRANSIENT := 16r0080.

    "
     self initialize
    "

    "Modified: / 13.5.1998 / 14:44:43 / cg"
! !

!JavaField class methodsFor:'constants'!

A_FINAL
    ^ A_FINAL


!

A_PRIVATE
    ^ A_PRIVATE


!

A_PROTECTED
    ^ A_PROTECTED

    "Created: / 13.5.1998 / 13:03:51 / cg"
!

A_PUBLIC
    ^ A_PUBLIC


!

A_STATIC
    ^ A_STATIC

    "Created: / 13.5.1998 / 13:03:55 / cg"
!

A_TRANSIENT
    ^ A_TRANSIENT


!

A_VOLATILE
    ^ A_VOLATILE


! !

!JavaField methodsFor:'accessing'!

constantValue
    ^ constantValue
!

constantValue:aValue
    constantValue := aValue
!

name
    ^ name
!

signature
    ^ signature

    "Created: / 15.10.1998 / 10:37:06 / cg"
! !

!JavaField methodsFor:'printing & storing'!

displayString
    ^ self class name , '(name: ' , name displayString , ')'


! !

!JavaField methodsFor:'private accessing'!

setAccessFlags:flags
    accessFlags := flags.

    "Created: 16.4.1996 / 13:04:25 / cg"
!

setConstantValue:something
    constantValue := something.

    "Created: 16.4.1996 / 13:04:58 / cg"
!

setName:aString
    name := aString.

    "Created: 16.4.1996 / 13:04:35 / cg"
!

setSignature:aString
    signature := aString.

    "Created: 16.4.1996 / 13:04:43 / cg"
! !

!JavaField methodsFor:'queries'!

initialValue
    ^ JavaClass initialValueFromSignature:signature


!

isFinal
    ^ (accessFlags bitAnd:A_FINAL) ~~ 0

    "Modified: / 13.5.1998 / 12:59:26 / cg"
!

isPrivate
    ^ (accessFlags bitAnd:A_PRIVATE) ~~ 0

    "Modified: / 13.5.1998 / 12:59:30 / cg"
!

isProtected
    ^ (accessFlags bitAnd:A_PROTECTED) ~~ 0

    "Modified: / 13.5.1998 / 12:59:35 / cg"
!

isPublic
    ^ (accessFlags bitAnd:A_PUBLIC) ~~ 0

    "Modified: / 13.5.1998 / 12:59:40 / cg"
!

isStatic
    ^ (accessFlags bitAnd:A_STATIC) ~~ 0

    "Modified: / 13.5.1998 / 12:59:43 / cg"
!

isTransient
    ^ (accessFlags bitAnd:A_TRANSIENT) ~~ 0

    "Modified: / 13.5.1998 / 12:59:51 / cg"
!

isVolatile
    ^ (accessFlags bitAnd:A_VOLATILE) ~~ 0

    "Modified: / 13.5.1998 / 12:59:56 / cg"
!

type
    ^ JavaMethod typeFromSignature:signature in:nil

    "Modified: / 8.1.1998 / 19:13:22 / cg"
! !

!JavaField class methodsFor:'documentation'!

version
    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaField.st,v 1.16 2002/11/22 20:11:30 cg Exp $'
! !

JavaField initialize!