Java 8 ObjectStreamField - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ObjectStreamField class.

This code example shows how to use the following methods:
	public static Boolean optimize = false;
	 
	static final long serialVersionUID = 657069456L;
	private static final String SerializationValuesFieldKey = "values";
	public static final Class _CLASS = _NSUtilities._classWithFullySpecifiedName("com.webobjects.eoaccess.ERXSingleValueID");
	private static final ObjectStreamField serialPersistentFields[] = { new ObjectStreamField(SerializationValuesFieldKey, Object[].class) };
	 
	protected Object _value;
 
	public ERXSingleValueID(String entityName, Object value) {
		super(entityName, _hashCode(entityName, value));
		_value = value != null ? value : NSKeyValueCoding.NullValue;
	} 
 
	@Override 
	public Object[] keyValues() {
		return new Object[] {_value};
	} 
 
	@Override 
6
CodeRank
This code example shows how to use the following methods:getName, getType, isUnshared
            // Expected. 
        } 
    } 
 
    public void test_ConstructorLjava_lang_StringLjava_lang_ClassB() { 
        ObjectStreamField osf = new ObjectStreamField("aField", int.class, false);
        assertTrue("Test 1: Name member not set correctly.",
                   osf.getName().equals("aField"));
        assertTrue("Test 2: Type member not set correctly.",
                   osf.getType().equals(int.class));
        assertFalse("Test 3: Unshared member not set correctly.",
                    osf.isUnshared());
 
        // Repeat the tests with a different object to make sure 
        // that we have not tested against default values. 
        osf = new ObjectStreamField("anotherField", String.class, true);
        assertTrue("Test 4: Name member not set correctly.",
                   osf.getName().equals("anotherField"));
        assertTrue("Test 5: Type member not set correctly.",
                   osf.getType().equals(String.class));
5
CodeRank
This code example shows how to use the following methods:getName, getType, isUnshared
            // Expected. 
        } 
    } 
 
    public void test_ConstructorLjava_lang_StringLjava_lang_ClassB() { 
        ObjectStreamField osf = new ObjectStreamField("aField", int.class, false);
        assertTrue("Test 1: Name member not set correctly.",
                   osf.getName().equals("aField"));
        assertTrue("Test 2: Type member not set correctly.",
                   osf.getType().equals(int.class));
        assertFalse("Test 3: Unshared member not set correctly.",
                    osf.isUnshared());
 
        // Repeat the tests with a different object to make sure 
        // that we have not tested against default values. 
        osf = new ObjectStreamField("anotherField", String.class, true);
        assertTrue("Test 4: Name member not set correctly.",
                   osf.getName().equals("anotherField"));
        assertTrue("Test 5: Type member not set correctly.",
                   osf.getType().equals(String.class));
5
CodeRank
This code example shows how to use the following methods:
This code example shows how to use the following methods:
 
@MappedClass("com.ibm.ws.management.event.FilterElement") 
public final class NotificationSelector implements NotificationFilter { 
    private static final long serialVersionUID = 5020421872211159772L;
    private static final ObjectStreamField[] serialPersistentFields = {
        new ObjectStreamField("listenerId", Integer.TYPE),
        new ObjectStreamField("info", NotificationInfo.class)
    }; 
     
    private static final AtomicInteger listenerIdSeq = new AtomicInteger();
     
    // In the original class, the listenerId identifies a NotificationListener instance. However, 
    // NotificationListener instances are irrelevant for the subscription API. Therefore we simply 
    // generate a unique ID. 
    private int listenerId = listenerIdSeq.incrementAndGet();
     
    private ObjectName name;
    private NotificationFilter filter;
     
    public NotificationSelector(ObjectName name, NotificationFilter filter) {
4
CodeRank
This code example shows how to use the following methods:
 
	private static final ObjectStreamField[] serialPersistentFields;
 
    static { 
        serialPersistentFields = new ObjectStreamField[] {
                new ObjectStreamField("_request", Request.class, true),
                new ObjectStreamField("_responseClass", Class.class, true),
                new ObjectStreamField("_redirected", Boolean.TYPE, true)
        }; 
    } 
 
    // instance attributes //////////////////////////////////////////////////// 
 
    protected transient Messenger _messenger;
 
    protected Request _request;
 
    protected transient CallResult _result;
 
    protected Class _responseClass;
3
CodeRank
This code example shows how to use the following methods:
 
private static final ObjectStreamField[] serialPersistentFields;
 
    static { 
        serialPersistentFields = new ObjectStreamField[] {
                new ObjectStreamField("_target", VPointer.class, true)
        }; 
    } 
 
    // instance attributes //////////////////////////////////////////////////// 
 
    /** 
     * Í×µá¤ËÂФ¹¤ë½èÍý¤¬¹Ô¤ï¤ì¤ëºÇ¾å°Ì¤Î node ¤ò»Ø¤¹¥Ý¥¤¥ó¥¿. 
     * null ¤Î¤È¤­¤Ï MetaNode ¤«¤é½èÍý¤ò¹Ô¤ï¤ì¤ë. 
     */ 
    private VPointer _target;
 
    private transient EndPoint _destination;
 
    // constructors /////////////////////////////////////////////////////////// 
4
CodeRank
This code example shows how to use the following methods:
	public static Boolean optimize = false;
	 
	static final long serialVersionUID = 657069456L;
	private static final String SerializationValuesFieldKey = "values";
	public static final Class _CLASS = _NSUtilities._classWithFullySpecifiedName("com.webobjects.eoaccess.ERXSingleValueID");
	private static final ObjectStreamField serialPersistentFields[] = { new ObjectStreamField(SerializationValuesFieldKey, Object[].class) };
	 
	protected Object _value; 
 
	public ERXSingleValueID(String entityName, Object value) {
		super(entityName, _hashCode(entityName, value));
		_value = value != null ? value : NSKeyValueCoding.NullValue; 
	} 
 
	@Override 
	public Object[] keyValues() { 
		return new Object[] {_value}; 
	} 
 
	@Override 
5
CodeRank
This code example shows how to use the following methods:
public class VirtualFileAdaptor implements Serializable {
    private static final long serialVersionUID = -4509594124653184347L;
 
    private static final ObjectStreamField[] serialPersistentFields =
            { 
                    new ObjectStreamField("path", String.class),
            }; 
 
    /** 
     * Minimal info to get full vfs file structure 
     */ 
    private String path;
    /** 
     * The virtual file 
     */ 
    private transient VirtualFile file;
 
    public VirtualFileAdaptor(VirtualFile file) {
        this.file = file;
    } 
5
CodeRank
This code example shows how to use the following methods:
 * @since 1.0: 
 *  
 */ 
public class User implements Serializable { 
	private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField( 
			"name", String.class) }; 
 
//	private String name; 
	 private transient String name; 
	private String email; 
 
	public User(String name, String email) { 
		this.name = name; 
		this.email = email; 
	} 
 
	public String getName() { 
		return this.name; 
	} 
 
4
CodeRank
See Code Examples for Java 8 ObjectStreamField Methods: