public Varnode createVarnode(long value, int spaceID, int size) {
		if (spaceID == 0) {
			return createConstantVarnode(value, size);
		}

		AddressSpace spc = addrFactory.getAddressSpace(spaceID);
		Address addr = null;

		if (spaceID == BAD_SPACE_ID_VALUE || spc == null) {
			addr = BAD_ADDRESS;
		}
		else if (spaceID == BAD_OFFSET_SPACEID) {
			// special case of unknown value + constant
			addr = spc.getTruncatedAddress(value, true);
		}
		else {
			addr = spc.getTruncatedAddress(value, true);
		}

		return new Varnode(addr, size);
	}
Check if the symbol at the address is read_only.

@param addr - address of the symbol

@return true if the block is read_only, and there are no write references.
Ghidra/Features/Base/src/main/java/ghidra/program/util/VarnodeContext.java