194 |
|
|
195 |
|
|
196 |
// Returns true iff the class that this ObjectStreamClass represents |
// Returns true iff the class that this ObjectStreamClass represents |
197 |
|
// has the following method: |
198 |
|
// |
199 |
|
// private void readObject (ObjectOutputStream) |
200 |
|
// |
201 |
|
// This method is used by the class to override default |
202 |
|
// serialization behavior. |
203 |
|
boolean hasReadMethod () |
204 |
|
{ |
205 |
|
try |
206 |
|
{ |
207 |
|
Class[] readObjectParams = { ObjectInputStream.class }; |
208 |
|
forClass ().getDeclaredMethod ("readObject", readObjectParams); |
209 |
|
return true; |
210 |
|
} |
211 |
|
catch (NoSuchMethodException e) |
212 |
|
{ |
213 |
|
return false; |
214 |
|
} |
215 |
|
} |
216 |
|
|
217 |
|
|
218 |
|
// Returns true iff the class that this ObjectStreamClass represents |
219 |
// implements Serializable but does *not* implement Externalizable. |
// implements Serializable but does *not* implement Externalizable. |
220 |
boolean isSerializable () |
boolean isSerializable () |
221 |
{ |
{ |