Codota Logo
OAVJavaType.getKind
Code IndexAdd Codota to your IDE (free)

How to use
getKind
method
in
jadex.rules.state.OAVJavaType

Best Java code snippets using jadex.rules.state.OAVJavaType.getKind (Showing top 20 results out of 315)

  • Common ways to obtain OAVJavaType
private void myMethod () {
OAVJavaType o =
  • Codota IconOAVTypeModel oAVTypeModel;Class clazz;oAVTypeModel.getJavaType(clazz)
  • Smart code suggestions by Codota
}
origin: org.activecomponents.jadex/jadex-rules

public Object put(Object key, Object value)
{
  OAVObjectType    type    = key!=null && !(key instanceof Tuple) ? state.getType(key) : null;
  return type instanceof OAVJavaType && !OAVJavaType.KIND_VALUE.equals(((OAVJavaType)type).getKind())
    ? identity.put(key, value) : equality.put(key, value);
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Check if an object is a java object but not a value.
 */
protected boolean isJavaNonValue(Object obj)
{
  return obj!=null && types.get(obj)==null
    && !tmodel.getJavaType(obj.getClass()).getKind().equals(OAVJavaType.KIND_VALUE);
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Check if an object is a java object but not a value.
 */
protected boolean isJavaNonValue(Object obj)
{
  return obj!=null && types.get(obj)==null
    && !tmodel.getJavaType(obj.getClass()).getKind().equals(OAVJavaType.KIND_VALUE);
}
 
origin: net.sourceforge.jadex/jadex-rules

public Object put(Object key, Object value)
{
  OAVObjectType    type    = key!=null && !(key instanceof Tuple) ? state.getType(key) : null;
  return type instanceof OAVJavaType && !OAVJavaType.KIND_VALUE.equals(((OAVJavaType)type).getKind())
    ? identity.put(key, value) : equality.put(key, value);
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Test if two values are equal
 *  according to current identity/equality
 *  settings. 
 */
public boolean	equals(Object a, Object b)
{
  // When a!=b && javaidentity use equals() only for ids or java values.
  return a==b || a!=null && (javaidentity
    ? ((generator.isId(a) || tmodel.getJavaType(a.getClass()).getKind().equals(OAVJavaType.KIND_VALUE)) && a.equals(b))
    : a.equals(b));
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Test if two values are equal
 *  according to current identity/equality
 *  settings. 
 */
public boolean	equals(Object a, Object b)
{
  // When a!=b && javaidentity use equals() only for ids or java values.
  return a==b || a!=null && (javaidentity
    ? ((generator.isId(a) || tmodel.getJavaType(a.getClass()).getKind().equals(OAVJavaType.KIND_VALUE)) && a.equals(b))
    : a.equals(b));
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Drop a Java object from root objects.
 *  @param object The Java object.
 */
public void removeJavaRootObject(Object object)
{
  assert nocheck || rootobjects.contains(object);
  
  this.rootobjects.remove(object);
  OAVJavaType    java_type = tmodel.getJavaType(object.getClass());
  
  if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
    deregisterValue(object);
  
  eventhandler.objectRemoved(object, java_type);
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Add a Java object as root object.
 *  @param object The Java object.
 */
public void addJavaRootObject(Object object)
{
  assert nocheck || !rootobjects.contains(object);
  
  this.rootobjects.add(object);
  OAVJavaType    java_type = tmodel.getJavaType(object.getClass());
  
  if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
    registerValue(java_type, object);
  
  eventhandler.objectAdded(object, java_type, true);
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Add a Java object as root object.
 *  @param object The Java object.
 */
public void addJavaRootObject(Object object)
{
  assert nocheck || !rootobjects.contains(object);
  
  this.rootobjects.add(object);
  OAVJavaType    java_type = tmodel.getJavaType(object.getClass());
  
  if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
    registerValue(java_type, object);
  
  eventhandler.objectAdded(object, java_type, true);
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Drop a Java object from root objects.
 *  @param object The Java object.
 */
public void removeJavaRootObject(Object object)
{
  assert nocheck || rootobjects.contains(object);
  
  this.rootobjects.remove(object);
  OAVJavaType    java_type = tmodel.getJavaType(object.getClass());
  
  if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
    deregisterValue(object);
  
  eventhandler.objectRemoved(object, java_type);
}
 
origin: net.sourceforge.jadex/jadex-rules

public boolean add(Object value)
{
  OAVObjectType    type    = value!=null && !(value instanceof Tuple) ? state.getType(value) : null;
  boolean	ret;
  if(type instanceof OAVJavaType && !OAVJavaType.KIND_VALUE.equals(((OAVJavaType)type).getKind()))
  {
    if(identity==null)
      identity    = new IdentityHashSet();
    ret    = identity.add(value);
  }
  else
  {
    if(equality==null)
      equality    = new LinkedHashSet();
    ret    = equality.add(value);
  }
  return ret;
}
 
origin: org.activecomponents.jadex/jadex-rules

public boolean add(Object value)
{
  OAVObjectType    type    = value!=null && !(value instanceof Tuple) ? state.getType(value) : null;
  boolean	ret;
  if(type instanceof OAVJavaType && !OAVJavaType.KIND_VALUE.equals(((OAVJavaType)type).getKind()))
  {
    if(identity==null)
      identity    = new IdentityHashSet();
    ret    = identity.add(value);
  }
  else
  {
    if(equality==null)
      equality    = new LinkedHashSet();
    ret    = equality.add(value);
  }
  return ret;
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Add a Java object as root object.
 *  @param object The Java object.
 */
public void addJavaRootObject(Object object)
{
  // #ifndef MIDP
  assert nocheck || !generator.isId(object);
  assert nocheck || !rootobjects.contains(object);
  // #endif
  
  OAVJavaType    java_type = tmodel.getJavaType(object.getClass());
  if(OAVJavaType.KIND_VALUE.equals(java_type.getKind()))
    throw new RuntimeException("Value types not supported for Java root objects: "+java_type+", "+object);
  
  this.rootobjects.add(object);
  
  if(this.javaobjects.add(object))	// Todo: java objects in nested states.
  {
    if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
      registerValue(java_type, object);
    eventhandler.objectAdded(object, java_type, true);
  }
}
 
origin: net.sourceforge.jadex/jadex-rules

/**
 *  Drop a Java object from root objects.
 *  @param object The Java object.
 */
public void removeJavaRootObject(Object object)
{
  // #ifndef MIDP
  assert nocheck || !generator.isId(object);
  assert nocheck || rootobjects.contains(object) && javaobjects.contains(object);
  // #endif
  
  OAVJavaType    java_type = tmodel.getJavaType(object.getClass());
  if(OAVJavaType.KIND_VALUE.equals(java_type.getKind()))
    throw new RuntimeException("Value types not supported for Java root objects: "+java_type+", "+object);
  this.rootobjects.remove(object);
  
  if(!objectusages.containsKey(object))	// Todo: java objects in nested states.
  {
    javaobjects.remove(object);
    if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
      deregisterValue(java_type, object);
    eventhandler.objectRemoved(object, java_type);
  }
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Drop a Java object from root objects.
 *  @param object The Java object.
 */
public void removeJavaRootObject(Object object)
{
  // #ifndef MIDP
  assert nocheck || !generator.isId(object);
  assert nocheck || rootobjects.contains(object) && javaobjects.contains(object);
  // #endif
  
  OAVJavaType    java_type = tmodel.getJavaType(object.getClass());
  if(OAVJavaType.KIND_VALUE.equals(java_type.getKind()))
    throw new RuntimeException("Value types not supported for Java root objects: "+java_type+", "+object);
  this.rootobjects.remove(object);
  
  if(!objectusages.containsKey(object))	// Todo: java objects in nested states.
  {
    javaobjects.remove(object);
    if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
      deregisterValue(java_type, object);
    eventhandler.objectRemoved(object, java_type);
  }
}
 
origin: org.activecomponents.jadex/jadex-rules

/**
 *  Add a Java object as root object.
 *  @param object The Java object.
 */
public void addJavaRootObject(Object object)
{
  // #ifndef MIDP
  assert nocheck || !generator.isId(object);
  assert nocheck || !rootobjects.contains(object);
  // #endif
  
  OAVJavaType    java_type = tmodel.getJavaType(object.getClass());
  if(OAVJavaType.KIND_VALUE.equals(java_type.getKind()))
    throw new RuntimeException("Value types not supported for Java root objects: "+java_type+", "+object);
  
  this.rootobjects.add(object);
  
  if(this.javaobjects.add(object))	// Todo: java objects in nested states.
  {
    if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
      registerValue(java_type, object);
    eventhandler.objectAdded(object, java_type, true);
  }
}
 
origin: net.sourceforge.jadex/jadex-rules

  /**
   *  Check if a value (oid or java object) is managed by the state.
   *  Returns true for attribute values which are directly contained oav objects
   *  or mutable java objects, e.g. not simple values such as strings or intergers. 
   */
  protected boolean	isManaged(Object value)
  {
    // Value is a directly contained object or java bean/object (i.e. not basic value)
    return value!=null && !tmodel.getJavaType(value.getClass()).getKind().equals(OAVJavaType.KIND_VALUE)
      && (!generator.isId(value) || internalContainsObject(value));
//        return value!=null &&
//                (!generator.isId(value) && !tmodel.getJavaType(value.getClass()).getKind().equals(OAVJavaType.KIND_VALUE)
//                    || internalContainsObject(value));

  }
   
origin: org.activecomponents.jadex/jadex-rules

  /**
   *  Check if a value (oid or java object) is managed by the state.
   *  Returns true for attribute values which are directly contained oav objects
   *  or mutable java objects, e.g. not simple values such as strings or intergers. 
   */
  protected boolean	isManaged(Object value)
  {
    // Value is a directly contained object or java bean/object (i.e. not basic value)
    return value!=null && !tmodel.getJavaType(value.getClass()).getKind().equals(OAVJavaType.KIND_VALUE)
      && (!generator.isId(value) || internalContainsObject(value));
//        return value!=null &&
//                (!generator.isId(value) && !tmodel.getJavaType(value.getClass()).getKind().equals(OAVJavaType.KIND_VALUE)
//                    || internalContainsObject(value));

  }
   
origin: net.sourceforge.jadex/jadex-rules

if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
  deregisterValue(value);
origin: org.activecomponents.jadex/jadex-rules

if(OAVJavaType.KIND_BEAN.equals(java_type.getKind()))
  deregisterValue(value);
jadex.rules.stateOAVJavaTypegetKind

Javadoc

Get the kind (i.e. value, object, or bean) of the type.

Popular methods of OAVJavaType

  • getAttributeType
    Get an attribute type description.
  • <init>
    Create a new OAV object type.
  • getClazz
    Get the Java class of the type.
  • equals
  • getName
  • getTypeModel
  • hashCode
  • isSubtype
    Test if this object is same type or subtype of this type.

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • putExtra (Intent)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JPanel (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now