Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<copyright> Copyright (c) 2009, 2010 Springsite BV (The Netherlands) and others All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: Martin Taal - Initial API and implementation </copyright> $Id: ModelObject.java,v 1.13 2011/08/25 12:32:37 mtaal Exp $
 
 
 package org.eclipse.emf.texo.model;
 
 import  org.eclipse.emf.ecore.EClass;
 import  org.eclipse.emf.ecore.EStructuralFeature;

The ModelObject is a wrapper/adapter of a model-managed pojo. A model-managed pojo is a pojo which has been generated on the basis of a model.

Author(s):
Martin Taal
See also:
ModelResolver.getModelObject(Object)
 
 public interface ModelObject<E extends Object> {

  

Returns:
the ModelPackage of this object
 

Parameters:
target the target object to be wrapped by this ModelObject
 
   void setTarget(E target);

  

Returns:
the expected Class of the target object
 
   Class<?> getTargetClass();

  

Returns:
the wrapped target object
 
   E getTarget();

  

Returns:
the EClass represented by this object
 
   EClass eClass();

  

Parameters:
eStructuralFeature the EStructuralFeature for which the value is returned.
Returns:
the value of the EStructuralFeature in the target object.
See also:
getTarget()
 
   Object eGet(EStructuralFeature eStructuralFeature);

  
Sets the value of an EStructuralFeature in the target object.

Parameters:
eStructuralFeature the feature to set
value the value to set
See also:
getTarget()
 
   void eSet(EStructuralFeature eStructuralFeatureObject value);

  
Adds a value to the EStructuralFeature of the target object.

Parameters:
eStructuralFeature the feature to add
value the value to add
Returns:
true if the object gets added to the list, normally an object is only added if it is not already in the list
 
   boolean eAddTo(EStructuralFeature eStructuralFeatureObject value);

  
Removes the value from an EStructuralFeature of the target object.

Parameters:
eStructuralFeature the feature to add
value the value to add
Returns:
true if the object got removed, if it was present in the list.
 
   boolean eRemoveFrom(EStructuralFeature eStructuralFeatureObject value);
New to GrepCode? Check out our FAQ X