/*********************************************	Copyright © 2001 Jason Lamport.	All rights reserved.----------------------*******************************************/package com.strangelight.mactoolbox;import com.apple.jdirect.*;import com.apple.mrj.jdirect.*;/** *	Implements JDirect's PointerStruct, using Mac toolbox calls to handle *	getSize() (Note that J_PointerStruct caches the return value of the  *	toolbox call.  If some other object resizes the Ptr, getSize() *	will subsequently return an incorrect value.) *	 */public class J_PointerStruct extends PointerStruct {	public J_PointerStruct(int new_ptr) {		super( new_ptr );		ptr_size = -1;	}	public int getSize() {		if ( 			( ptr_size == -1 )			&& ( pointer != 0 )		) {			ptr_size = MemoryFunctions.GetPtrSize( pointer );		}		return ptr_size;	}		protected int ptr_size;	}