public class Variant extends JacobObject
Just loading this class creates 3 variants that get added to the ROT
PROPVARIANT introduces new types so eventually Variant will need to be upgraded to support PropVariant types. http://blogs.msdn.com/benkaras/archive/2006/09/13/749962.aspx
This object no longer implements Serializable because serialization is broken (and has been since 2000/xp). The underlying marshalling/unmarshalling code is broken in the JNI layer.
(用于Java和COM之间的所有回叫和大多数通信的多格式数据类型。它提供了一个可以处理所有数据类型的类。只需加载此类,就会创建3个变体,这些变体将添加到ROT PROPVARIANT中,从而引入了新类型,因此最终需要对Variant进行升级以支持PropVariant类型。 http://blogs.msdn.com/benkaras/archive/2006/09/13/749962.aspx该对象不再实现Serializable,因为序列化已损坏(并且自2000 / xp起就已存在)。在JNI层中破坏了底层的编组/解组代码。)Modifier and Type | Field and Description |
---|---|
static Variant |
DEFAULT
Use this constant for optional parameters
(使用此常量作为可选参数)
|
static short |
VariantArray
variant's type is array VT_ARRAY 0x2000
(变体的类型是数组VT_ARRAY 0x2000)
|
static short |
VariantBoolean
variant's type is boolean VT_BOOL
(变体的类型是布尔VT_BOOL)
|
static short |
VariantByref
variant's type is a reference (to IDispatch?) VT_BYREF 0x4000
(变量的类型是对IDispatch的引用(对IDispatch?)VT_BYREF 0x4000)
|
static short |
VariantByte
variant's type is byte VT_UI1 This is an UNSIGNED byte
(变量的类型是字节VT_UI1这是一个未签名的字节)
|
static short |
VariantCurrency
variant's type is currency VT_CY
(变体的类型是货币VT_CY)
|
static short |
VariantDate
variant's type is date VT_DATE
(变体的类型是日期VT_DATE)
|
static short |
VariantDecimal
variant's type is object VT_DECIMAL
(变量的类型是对象VT_DECIMAL)
|
static short |
VariantDispatch
variant's type is dispatch VT_DISPATCH
(变体的类型是调度VT_DISPATCH)
|
static short |
VariantDouble
variant's type is double VT_R8
(变体的类型是double VT_R8)
|
static short |
VariantEmpty
variant's type is empty : equivalent to VB Nothing and VT_EMPTY
(变体的类型为空:等效于VB Nothing和VT_EMPTY)
|
static short |
VariantError
variant's type is error VT_ERROR
(变体的类型为错误VT_ERROR)
|
static short |
VariantFloat
variant's type is float VT_R4
(变体的类型是float VT_R4)
|
static short |
VariantInt
variant's type is int VT_I4, a Long in VC
(变体的类型是int VT_I4,VC中的Long)
|
static short |
VariantLongInt
variant's type is 64 bit long integer VT_I8 - not yet implemented in Jacob because we have to decide what to do with Currency and because its only supported on XP and later.
(变体的类型是64位长的整数VT_I8-尚未在Jacob中实现,因为我们必须决定如何处理Currency,并且仅在XP和更高版本中才支持。)
|
static short |
VariantNull
variant's type is null : equivalent to VB Null and VT_NULL
(变体的类型为null:等效于VB Null和VT_NULL)
|
static short |
VariantObject
variant's type is object VT_UNKNOWN
(变量的类型是对象VT_UNKNOWN)
|
static short |
VariantPointer
This value is for reference only and is not to be used by any callers
(此值仅供参考,任何调用者均不得使用)
|
static short |
VariantShort
variant's type is short VT_I2
(变体的类型很短VT_I2)
|
static short |
VariantString
variant's type is string also known as VT_BSTR
(变体的类型是字符串,也称为VT_BSTR)
|
static short |
VariantTypeMask
what is this? VT_TYPEMASK && VT_BSTR_BLOB 0xfff
(这是什么? VT_TYPEMASK和&VT_BSTR_BLOB 0xfff)
|
static short |
VariantVariant
variant's type is variant it encapsulate another variant VT_VARIANT
(变量的类型是变量,它封装了另一个变量VT_VARIANT)
|
static Variant |
VT_FALSE
Use for true/false variant parameters
(用于true / false变体参数)
|
static Variant |
VT_MISSING
Same than
DEFAULT
(与DEFAULT相同)
|
static Variant |
VT_TRUE
Use for true/false variant parameters
(用于true / false变体参数)
|
Constructor and Description |
---|
Variant()
public constructor, initializes and sets type to VariantEmpty
|
Variant(boolean in)
Constructor that accepts a primitive rather than an object
|
Variant(byte in)
Constructor that accepts a primitive rather than an object
|
Variant(double in)
Constructor that accepts a primitive rather than an object
|
Variant(float in)
Constructor that accepts a primitive rather than an object
|
Variant(int in)
Constructor that accepts a primitive rather than an object
|
Variant(long in)
Constructor that accepts a primitive rather than an object
|
Variant(Object in)
Convenience constructor that calls the main one with a byRef value of false
|
Variant(Object pValueObject, boolean fByRef)
Constructor that accepts the data object and information about whether this is by reference or not.
|
Variant(short in)
Constructor that accepts a primitive rather than an object
|
Modifier and Type | Method and Description |
---|---|
Variant |
changeType(short in)
Cover for native method so we can cover it.
(覆盖本机方法,因此我们可以覆盖它。)
|
Object |
clone()
this returns null
(这将返回null)
|
Variant |
cloneIndirect()
Deprecated.
No longer used
(不推荐使用。不再使用)
|
protected void |
finalize() |
boolean |
getBoolean() |
boolean |
getBooleanRef()
public cover for native method
(本机方法的公共覆盖)
|
byte |
getByte() |
byte |
getByteRef()
public cover for native method
(本机方法的公共覆盖)
|
Currency |
getCurrency()
MS Currency objects are 64 bit fixed point numbers with 15 digits to the left and 4 to the right of the decimal place.
(MS货币对象是64位定点数,在小数点左边15位,右边4位。)
|
Currency |
getCurrencyRef()
MS Currency objects are 64 bit fixed point numbers with 15 digits to the left and 4 to the right of the decimal place.
(MS货币对象是64位定点数,在小数点左边15位,右边4位。)
|
double |
getDate() |
double |
getDateRef() |
BigDecimal |
getDecimal()
return the BigDecimal value held in this variant (fails on other types)
(返回此变体中保存的BigDecimal值(在其他类型上失败))
|
BigDecimal |
getDecimalRef()
return the BigDecimal value held in this variant (fails on other types)
(返回此变体中保存的BigDecimal值(在其他类型上失败))
|
Dispatch |
getDispatch()
cover for
toDispatch() This method now matches other getXXX() methods.
(toDispatch()的封面现在,此方法与其他getXXX()方法匹配。)
|
Dispatch |
getDispatchRef()
Dispatch and dispatchRef are treated the same This is just a cover for toDispatch() with a flag check
(Dispatch和dispatchRef的处理方式相同这只是toDispatch()的封面,带有标志检查)
|
double |
getDouble() |
double |
getDoubleRef() |
void |
getEmpty()
Deprecated.
method never did anything
(不推荐使用。方法从没做过)
|
int |
getError() |
int |
getErrorRef() |
float |
getFloat() |
float |
getFloatRef() |
int |
getInt()
return the int value held in this variant if it is an int or a short.
(如果它是int或short,则返回此变体中保存的int值。)
|
int |
getIntRef()
get the content of this variant as an int
(以int形式获取此变体的内容)
|
Date |
getJavaDate()
returns the windows time contained in this Variant to a Java Date.
(将此变体中包含的Windows时间返回到Java日期。)
|
Date |
getJavaDateRef()
returns the windows time contained in this Variant to a Java Date should return null if this is not a date reference Variant SF 959382
(将包含在此变量中的Windows时间返回给Java Date,如果它不是日期引用,则应返回null SF 959382)
|
long |
getLong()
64 bit Longs only available on x64.
(64位长仅在x64上可用。)
|
long |
getLongRef()
64 bit Longs only available on x64.
(64位长仅在x64上可用。)
|
void |
getNull()
Deprecated.
method never did anything
(不推荐使用。方法从没做过)
|
short |
getShort()
return the int value held in this variant (fails on other types?)
(返回此变体中保存的int值(其他类型失败吗?))
|
short |
getShortRef()
get the content of this variant as an int
(以int形式获取此变体的内容)
|
String |
getString() |
String |
getStringRef()
gets the content of the variant as a string ref
(获取变量的内容作为字符串引用)
|
Object |
getVariant()
Used to get the value from a windows type of VT_VARIANT or a jacob Variant type of VariantVariant.
(用于从VT_VARIANT的Windows类型或VariantVariant的jacob Variant类型获取值。)
|
Variant[] |
getVariantArray()
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
Variant[] |
getVariantArrayRef()
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
short |
getvt()
Reports the type of the underlying Variant object
(报告基础Variant对象的类型)
|
protected void |
init()
initializes the COM Variant and puts its reference in this instance
(初始化COM Variant并将其引用放入此实例)
|
boolean |
isNull() |
void |
noParam()
Deprecated.
replaced by putNoParam()
(不推荐使用。替换为putNoParam())
|
protected boolean |
objectIsAConstant(Variant pVariant)
returns true if the passed in Variant is a constant that should not be freed
(如果传入的Variant是一个不应释放的常量,则返回true)
|
void |
putBoolean(boolean in)
puts a boolean into the variant and sets it's type
(将布尔值放入变量中并设置其类型)
|
void |
putBooleanRef(boolean in)
pushes a boolean into the variant by ref and sets the type of the variant to boolean
(通过ref将布尔值推送到变量中,并将变量的类型设置为boolean)
|
void |
putByte(byte in)
pushes a byte into the varaint and sets the type
(向变体中推送一个字节并设置类型)
|
void |
putByteArray(Object in)
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
void |
putByteRef(byte in)
pushes a byte into the variant by ref and sets the type
(通过ref将字节压入变量并设置类型)
|
void |
putCharArray(Object in)
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
void |
putCurrency(Currency in)
Puts a value in as a currency and sets the variant type.
(以货币形式输入值并设置变量类型。)
|
void |
putCurrencyRef(Currency in)
Pushes a long into the variant as currency and sets the type.
(将长整数作为货币推送并设置类型。)
|
void |
putDate(Date inDate)
converts a java date to a windows time and calls putDate(double) SF 959382
(将Java日期转换为Windows时间并调用putDate(double)SF 959382)
|
void |
putDate(double in)
puts a windows date double into the variant and sets the type
(将Windows日期的double值放入变量中并设置类型)
|
void |
putDateRef(Date inDate)
converts a java date to a windows time and calls putDateRef(double) SF 959382
(将Java日期转换为Windows时间并调用putDateRef(double)SF 959382)
|
void |
putDateRef(double in)
set the content of this variant to a date (VT_DATE|VT_BYREF)
(将此变体的内容设置为日期(VT_DATE | VT_BYREF))
|
void |
putDecimal(BigDecimal in)
EXPERIMENTAL 1.14 feature to support rounded decimals.
(实验1.14功能支持四舍五入的小数。)
|
void |
putDecimalRef(BigDecimal in)
Set the value of this variant and set the type.
(设置此变量的值并设置类型。)
|
void |
putDispatch(Dispatch in)
This acts a cover for putVariant Dispatch.
(这充当了putVariant Dispatch的掩护。)
|
void |
putDispatchRef(Dispatch in)
Dispatch and dispatchRef are treated the same This is a cover for putVariantDispatch().
(Dispatch和dispatchRef的处理方式相同。这是putVariantDispatch()的封面。)
|
void |
putDouble(double in)
wraps this Variant around the passed in double.
(将此Variant包裹在传入的double中。)
|
void |
putDoubleRef(double in)
set the content of this variant to a double (VT_R8|VT_BYREF)
(将此变量的内容设置为双精度(VT_R8 | VT_BYREF))
|
void |
putEmpty()
sets the type to VariantEmpty
(将类型设置为VariantEmpty)
|
void |
putError(int in)
puts an error code (I think) into the variant and sets the type
(将错误代码(我认为)放入变量并设置类型)
|
void |
putErrorRef(int in)
pushes an error code into the variant by ref and sets the type
(通过ref将错误代码推送到变量中并设置类型)
|
void |
putFloat(float in)
fills the Variant with a float and sets the type to float
(用浮点数填充Variant并将类型设置为float)
|
void |
putFloatRef(float in)
pushes a float into the variant and sets the type
(将float推入变量并设置类型)
|
void |
putInt(int in)
set the value of this variant and set the type
(设置此变量的值并设置类型)
|
void |
putIntRef(int in)
set the content of this variant to an int (VT_I4|VT_BYREF)
(将此变量的内容设置为int(VT_I4 | VT_BYREF))
|
void |
putLong(long in)
Puts a 64 bit Java Long into a 64 bit Variant Long.
(将64位Java Long放入64位Variant Long中。)
|
void |
putLongRef(long in)
Puts a 64 bit Java Long into a 64 bit Variant Long.
(将64位Java Long放入64位Variant Long中。)
|
void |
putNoParam()
sets the type to VT_ERROR and the error message to DISP_E_PARAMNOTFOIUND
(将类型设置为VT_ERROR并将错误消息设置为DISP_E_PARAMNOTFOIUND)
|
void |
putNothing()
Sets the type to VariantDispatch and sets the value to null Equivalent to VB's nothing
(将类型设置为VariantDispatch并将值设置为null等效于VB)
|
void |
putNull()
Set this Variant's type to VT_NULL (the VB equivalent of NULL)
(将此Variant的类型设置为VT_NULL(VB等效于NULL))
|
void |
putObject(Object in)
Deprecated.
should use putDispatch()
(不推荐使用。应该使用putDispatch())
|
void |
putObjectRef(Object in)
Deprecated.
(不推荐使用。)
|
void |
putSafeArray(SafeArray in)
have no idea...
(不知道...)
|
void |
putSafeArrayRef(SafeArray in)
have no idea...
(不知道...)
|
void |
putShort(short in)
set the content of this variant to a short (VT_I2)
(将此变体的内容设置为简短(VT_I2))
|
void |
putShortRef(short in)
set the content of this variant to a short (VT_I2|VT_BYREF)
(将此变量的内容设置为简短形式(VT_I2 | VT_BYREF))
|
void |
putString(String in)
put a string into the variant and set its type
(将字符串放入变量中并设置其类型)
|
void |
putStringRef(String in)
set the content of this variant to a string (VT_BSTR|VT_BYREF)
(将此变量的内容设置为字符串(VT_BSTR | VT_BYREF))
|
void |
putVariant(Object objectToBeWrapped)
Puts a variant into this variant making it type VT_VARIANT.
(将一个变量放入此变量中,使其类型为VT_VARIANT。)
|
void |
putVariantArray(Variant[] in)
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
void |
putVariantArrayRef(Variant[] in)
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
void |
safeRelease()
This will release the "C" memory for the Variant unless this Variant is one of the constants in which case we don't want to release the memory.
(这将释放变量的“ C”内存,除非该变量是常量之一,在这种情况下,我们不想释放内存。)
|
protected void |
SerializationReadFromBytes(byte[] ba)
this is supposed to cause the underlying variant object struct to be rebuilt from a previously serialized byte array.
(这可能会导致基础变体对象结构从以前序列化的字节数组中重建。)
|
protected byte[] |
SerializationWriteToBytes()
this is supposed to create a byte array that represents the underlying variant object structure
(这应该创建一个字节数组,该字节数组表示基础变体对象结构)
|
boolean |
toBoolean()
Deprecated.
should be replaced by changeType() followed by getBoolean()
(不推荐使用。应该由ch??angeType()和getBoolean()代替)
|
byte |
toByte()
Deprecated.
should be replaced by changeType() followed by getByte()
(不推荐使用。应该由ch??angeType()和getByte()代替)
|
Object |
toByteArray()
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
Object |
toCharArray()
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
Currency |
toCurrency()
Deprecated.
should be replaced by changeType() followed by getCurrency
(不推荐使用。应该由ch??angeType()替换,再由getCurrency替换)
|
double |
toDate()
Deprecated.
should use changeType() followed by getDate()
(不推荐使用。应该使用changeType(),然后使用getDate())
|
Dispatch |
toDispatch() |
double |
toDouble()
Deprecated.
should call changeType() then getDouble()
(不推荐使用。应该先调用changeType()然后再调用getDouble())
|
EnumVariant |
toEnumVariant() |
int |
toError()
Deprecated.
should use changeType() followed by getError()
(不推荐使用。应该使用changeType(),然后使用getError())
|
float |
toFloat()
Deprecated.
should use changeType() and getFloat() instead
(不推荐使用。应该使用changeType()和getFloat()代替)
|
int |
toInt()
Deprecated.
should use changeType() followed by getInt()
(不推荐使用。应该使用changeType(),然后使用getInt())
|
Date |
toJavaDate()
Deprecated.
callers should use getDate()
(不推荐使用。调用者应使用getDate())
|
Object |
toJavaObject()
Convert a JACOB Variant value to a Java object (type conversions).
(将JACOB Variant值转换为Java对象(类型转换)。)
|
Object |
toObject()
Deprecated.
this is a cover for toDispatch();
(不推荐使用。这是toDispatch()的封面;)
|
SafeArray |
toSafeArray()
By default toSafeArray makes a deep copy due to the fact that this Variant owns the embedded SafeArray and will destroy it when it gc's calls toSafeArray(true).
(默认情况下,由于该Variant拥有嵌入式SafeArray,并且在gc调用toSafeArray(true)时会销毁它,因此toSafeArray进行深度复制。)
|
SafeArray |
toSafeArray(boolean deepCopy)
This lets folk turn into a safe array without a deep copy.
(这样一来,人们就可以在不进行深层复制的情况下变成安全的阵列。)
|
Object |
toScriptObject()
Deprecated.
(不推荐使用。)
|
short |
toShort()
Deprecated.
callers should use changeType() followed by getShort()
(不推荐使用。调用者应使用changeType()后跟getShort())
|
String |
toString()
This method now correctly implements java toString() semantics Attempts to return the content of this variant as a string "not initialized" if not initialized "null" if VariantEmpty, "null" if VariantError "null" if VariantNull "null" if Variant type didn't convert.
(此方法现在可以正确实现java toString()语义尝试将此变体的内容作为字符串“未初始化”返回(如果未初始化),如果VariantEmpty为“ null”,如果VariantError为“ null”,如果VariantError为“ null”,如果VariantNull,为“ null”,如果Variant类型没有转换。)
|
Variant |
toVariant()
Deprecated.
superseded by "this"
(不推荐使用。被“ this”取代)
|
Variant[] |
toVariantArray()
Deprecated.
superseded by SafeArray
(不推荐使用。被SafeArray取代)
|
void |
VariantClear()
Clear the content of this variant
(清除此变体的内容)
|
debug, getBuildDate, getBuildVersion, isDebugEnabled
public static final Variant DEFAULT
public static final Variant VT_TRUE
public static final Variant VT_FALSE
public static final short VariantEmpty
public static final short VariantNull
public static final short VariantShort
public static final short VariantInt
public static final short VariantFloat
public static final short VariantDouble
public static final short VariantCurrency
public static final short VariantDate
public static final short VariantString
public static final short VariantDispatch
public static final short VariantError
public static final short VariantBoolean
public static final short VariantVariant
public static final short VariantObject
public static final short VariantDecimal
public static final short VariantByte
public static final short VariantLongInt
public static final short VariantPointer
public static final short VariantTypeMask
public static final short VariantArray
public static final short VariantByref
public Variant()
public Variant(boolean in)
in
-
(-)
public Variant(byte in)
in
-
(-)
public Variant(double in)
in
-
(-)
public Variant(float in)
in
-
(-)
public Variant(int in)
in
-
(-)
public Variant(long in)
in
-
(-)
public Variant(Object in)
in
- object to be made into variant
(-成为变体的对象)
public Variant(Object pValueObject, boolean fByRef)
pValueObject
- The value object that will pushed down into windows memory. A null object sets this to "empty"
(-将压入Windows内存的值对象。空对象将此设置为“空”)
fByRef
-
(-)
public Variant(short in)
in
-
(-)
public Variant changeType(short in)
This cannot convert an object to a byRef. It can convert from byref to not byref
(覆盖本机方法,因此我们可以覆盖它。这不能将对象转换为byRef。它可以从byref转换为not byref)in
- type to convert this variant too
(-键入也可以转换此变体)
public Object clone()
@Deprecated public Variant cloneIndirect()
public boolean getBoolean()
IllegalStateException
- if variant is not of the requested type
public boolean getBooleanRef()
IllegalStateException
- if variant is not of the requested type
public byte getByte()
IllegalStateException
- if variant is not of the requested type
public byte getByteRef()
IllegalStateException
- if variant is not of the requested type
public Currency getCurrency()
IllegalStateException
- if variant is not of the requested type
public Currency getCurrencyRef()
IllegalStateException
- if variant is not of the requested type
public double getDate()
IllegalStateException
- if variant is not of the requested type
public double getDateRef()
IllegalStateException
- if variant is not of the requested type
public BigDecimal getDecimal()
IllegalStateException
- if variant is not of the requested type
public BigDecimal getDecimalRef()
IllegalStateException
- if variant is not of the requested type
public Dispatch getDispatch()
toDispatch()
This method now matches other getXXX() methods. It throws an IllegalStateException if the object is not of type VariantDispatch
(toDispatch()的封面现在,此方法与其他getXXX()方法匹配。如果对象不是VariantDispatch类型,则抛出IllegalStateException。)
IllegalStateException
- if wrong variant type
public Dispatch getDispatchRef()
IllegalStateException
- if variant is not of the requested type
public double getDouble()
IllegalStateException
- if variant is not of the requested type
public double getDoubleRef()
IllegalStateException
- if variant is not of the requested type
@Deprecated public void getEmpty()
public int getError()
IllegalStateException
- if variant is not of the requested type
public int getErrorRef()
IllegalStateException
- if variant is not of the requested type
public float getFloat()
IllegalStateException
- if variant is not of the requested type
public float getFloatRef()
IllegalStateException
- if variant is not of the requested type
public int getInt()
IllegalStateException
- if variant is not of the requested type
public int getIntRef()
IllegalStateException
- if variant is not of the requested type
public Date getJavaDate()
IllegalStateException
- if variant is not of the requested type
public Date getJavaDateRef()
public long getLong()
IllegalStateException
- if variant is not of the requested type
public long getLongRef()
IllegalStateException
- if variant is not of the requested type
@Deprecated public void getNull()
public short getShort()
IllegalStateException
- if variant is not of the requested type
public short getShortRef()
IllegalStateException
- if variant is not of the requested type
public String getString()
IllegalStateException
- if this variant is not of type String
public String getStringRef()
IllegalStateException
- if variant is not of the requested type
public Object getVariant()
@Deprecated public Variant[] getVariantArray()
NotImplementedException
@Deprecated public Variant[] getVariantArrayRef()
NotImplementedException
public short getvt()
IllegalStateException
- if there is no underlying windows data structure
protected void init()
public boolean isNull()
IllegalStateException
- if there is no underlying windows memory
@Deprecated public void noParam()
protected boolean objectIsAConstant(Variant pVariant)
pVariant
-
(-)
public void putBoolean(boolean in)
in
- the new value
(-新价值)
public void putBooleanRef(boolean in)
in
-
(-)
public void putByte(byte in)
in
-
(-)
@Deprecated public void putByteArray(Object in)
in
- doesn't matter because this method does nothing
(-没关系,因为此方法不起作用)
NotImplementedException
public void putByteRef(byte in)
in
-
(-)
@Deprecated public void putCharArray(Object in)
in
- the object that would be wrapped by the Variant if this method was implemented
(-如果实现了此方法,则由Variant包装的对象)
NotImplementedException
public void putCurrency(Currency in)
in
- the long that will be put into the 64 bit currency object.
(-将放入64位货币对象中的多头。)
public void putCurrencyRef(Currency in)
in
- the long that will be put into the 64 bit currency object
(-将放入64位货币对象中的多头)
public void putDate(Date inDate)
inDate
- a Java date to be converted
(-要转换的Java日期)
IllegalArgumentException
- if inDate = null
public void putDate(double in)
in
-
(-)
public void putDateRef(Date inDate)
inDate
- a Java date to be converted
(-要转换的Java日期)
IllegalArgumentException
- if inDate = null
public void putDateRef(double in)
in
-
(-)
public void putDecimal(BigDecimal in)
Set the value of this variant and set the type. This may throw exceptions more often than the caller expects because most callers don't manage the scale of their BigDecimal objects.
This default set method throws exceptions if precision or size is out of bounds
There are 12 bytes available for the integer number.
There is 1 byte for the scale.
(实验1.14功能支持四舍五入的小数。设置此变量的值并设置类型。这可能比调用者期望的更多地引发异常,因为大多数调用者都不管理其BigDecimal对象的规模。如果精度或大小超出范围,则此默认set方法将引发异常。整数有12个字节可用。标度有1个字节。)in
- the BigDecimal that will be converted to VT_DECIMAL
(-将转换为VT_DECIMAL的BigDecimal)
IllegalArgumentException
- if the scale is > 28, the maximum for VT_DECIMAL or if there are more than 12 bytes worth the digits
public void putDecimalRef(BigDecimal in)
This default set method throws exceptions if precision or size is out of bounds
There are 12 bytes available for the integer number.
There is 1 byte for the scale.
(设置此变量的值并设置类型。这可能比调用者期望的更多地引发异常,因为大多数调用者都不管理其BigDecimal对象的规模。如果精度或大小超出范围,则此默认set方法将引发异常。整数有12个字节可用。标度有1个字节。)in
- the BigDecimal that will be converted to VT_DECIMAL
(-将转换为VT_DECIMAL的BigDecimal)
IllegalArgumentException
- if the scale is > 28, the maximum for VT_DECIMAL or if there are more than 12 bytes worth the digits
public void putDispatch(Dispatch in)
in
- the Dispatch we're putting down in the COM variant space.
(-我们在COM变量空间中放下的Dispatch。)
public void putDispatchRef(Dispatch in)
in
- the Dispatch we're putting down in the COM variant space.
(-我们在COM变量空间中放下的Dispatch。)
public void putDouble(double in)
in
-
(-)
public void putDoubleRef(double in)
in
-
(-)
public void putEmpty()
public void putError(int in)
in
-
(-)
public void putErrorRef(int in)
in
-
(-)
public void putFloat(float in)
in
-
(-)
public void putFloatRef(float in)
in
-
(-)
public void putInt(int in)
in
-
(-)
public void putIntRef(int in)
in
-
(-)
public void putLong(long in)
in
- the long that will be put into the 64 bit Long object.
(-将放入64位Long对象中的long。)
public void putLongRef(long in)
in
- the long that will be put into the 64 bit Long object.
(-将放入64位Long对象中的long。)
public void putNoParam()
public void putNothing()
public void putNull()
@Deprecated public void putObject(Object in)
in
- the object we are putting into the Variant, assumes a
(-我们要放入Variant中的对象假设一个)
putDispatch(Dispatch)
@Deprecated public void putObjectRef(Object in)
in
-
(-)
public void putSafeArray(SafeArray in)
in
-
(-)
public void putSafeArrayRef(SafeArray in)
in
-
(-)
public void putShort(short in)
in
-
(-)
public void putShortRef(short in)
in
-
(-)
public void putString(String in)
in
-
(-)
public void putStringRef(String in)
in
-
(-)
public void putVariant(Object objectToBeWrapped)
objectToBeWrapped
- A object that is to be referenced by this variant. If objectToBeWrapped is already of type Variant, then it is used. If objectToBeWrapped is not Variant then
new Variant(objectToBeWrapped)
is called and the result is passed into the com layer
(-该变量要引用的对象。如果objectToBeWrapped已经是Variant类型,则使用它。如果objectToBeWrapped不是Variant,则将其调用并将结果传递到com层)
IllegalArgumentException
- if inVariant = null or if inVariant is a Varint
@Deprecated public void putVariantArray(Variant[] in)
in
- doesn't matter because this method does nothing
(-没关系,因为此方法不起作用)
NotImplementedException
@Deprecated public void putVariantArrayRef(Variant[] in)
in
- the thing that would be come an array if this method was implemented
(-如果实现此方法,将成为数组的东西)
NotImplementedException
public void safeRelease()
safeRelease
in class
JacobObject
JacobObject.safeRelease()
protected void SerializationReadFromBytes(byte[] ba)
ba
-
(-)
protected byte[] SerializationWriteToBytes()
@Deprecated public boolean toBoolean()
@Deprecated public byte toByte()
@Deprecated public Object toByteArray()
NotImplementedException
@Deprecated public Object toCharArray()
NotImplementedException
@Deprecated public Currency toCurrency()
@Deprecated public double toDate()
public Dispatch toDispatch()
@Deprecated public double toDouble()
public EnumVariant toEnumVariant()
@Deprecated public int toError()
@Deprecated public float toFloat()
@Deprecated public int toInt()
@Deprecated public Date toJavaDate()
This method added 12/2005 for possible use by jacobgen instead of its conversion code
This does not convert the data
(返回此Variant中包含的Windows时间,因为Java Date转换为与其他toXXX()方法SF 959382一样的日期。此方法添加了12/2005,供jacobgen可能使用,而不是其转换代码。此方法不转换数据)public Object toJavaObject() throws JacobException
IllegalStateException
- if no underlying windows data structure
NotImplementedException
- if unsupported conversion is requested
JacobException
- if the calculated result was a JacobObject usually as a result of error
@Deprecated public Object toObject()
instead
public SafeArray toSafeArray()
public SafeArray toSafeArray(boolean deepCopy)
deepCopy
-
(-)
@Deprecated public Object toScriptObject()
@Deprecated public short toShort()
public String toString()
toString
in class
Object
IllegalStateException
- if there is no underlying windows data structure
@Deprecated public Variant toVariant()
@Deprecated public Variant[] toVariantArray()
NotImplementedException
public void VariantClear()
http://jacob-project.sourceforge.net