Computes the adornment flags for the given element.

@param obj
the element to compute the flags for

@return the adornment flags
175198
protected int computeAdornmentFlags(Object obj)
	{
//		try
//		{
			if (obj instanceof IVdmElement)
			{
				IVdmElement element = (IVdmElement) obj;
				int type = element.getElementType();
				switch (type)
				{
				case IVdmElement.VDM_MODEL:
				case IVdmElement.VDM_PROJECT:
					// case IVdmElement.PACKAGE_FRAGMENT_ROOT:
					// return getErrorTicksFromMarkers(element.getResource(), IResource.DEPTH_INFINITE, null);
					// case IVdmElement.PACKAGE_FRAGMENT:
				case IVdmElement.COMPILATION_UNIT:
					// case IVdmElement.CLASS_FILE:
					// return getErrorTicksFromMarkers(element.getResource(), IResource.DEPTH_ONE, null);
					// case IVdmElement.PACKAGE_DECLARATION:
					// case IVdmElement.IMPORT_DECLARATION:
					// case IVdmElement.IMPORT_CONTAINER:
				case IVdmElement.TYPE:
				case IVdmElement.INITIALIZER:
				case IVdmElement.METHOD:
				case IVdmElement.FIELD:
					// case IVdmElement.LOCAL_VARIABLE:
					// ICompilationUnit cu= (ICompilationUnit)
					// element.getAncestor(IVdmElement.COMPILATION_UNIT);
					// if (cu != null) {
					// ISourceReference ref= (type == IVdmElement.COMPILATION_UNIT) ? null :
					// (ISourceReference) element;
					// // The assumption is that only source elements in compilation unit can have markers
					// IAnnotationModel model= isInJavaAnnotationModel(cu);
					// int result= 0;
					// if (model != null) {
					// // open in Java editor: look at annotation model
					// result= getErrorTicksFromAnnotationModel(model, ref);
					// } else {
					// result= getErrorTicksFromMarkers(cu.getResource(), IResource.DEPTH_ONE, ref);
					// }
					// fCachedRange= null;
					// return result;
					// }
					break;
				default:
				}
			} 
//			else if (obj instanceof IResource)
//			{
//				return getErrorTicksFromMarkers((IResource) obj,
//						IResource.DEPTH_INFINITE,
//						null);
//			}
//		} catch (CoreException e)
//		{
//			if (e instanceof VdmModelException)
//			{
//				if (((VdmModelException) e).isDoesNotExist())
//				{
//					return 0;
//				}
//			}
//			if (e.getStatus().getCode() == IResourceStatus.MARKER_NOT_FOUND)
//			{
//				return 0;
//			}
//
//			VdmUIPlugin.log(e);
//		}
		return 0;
	}
590107
public static Stream<Map.Entry<Method, Object>> getters(Object obj) {
		return getters(obj, Predicates.alwaysTrue());
	}
902310
function (obj) {
            var inst = this._getInst(obj);
            var isRTL = this._get(inst, 'isRTL');
            while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
                obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
            }
            var position = $(obj).offset();
            return [position.left, position.top];
        }
884932
public static Object[] getFieldsValue(Object obj) {
		if (null != obj) {
			final Field[] fields = getFields(obj.getClass());
			if (null != fields) {
				final Object[] values = new Object[fields.length];
				for (int i = 0; i < fields.length; i++) {
					values[i] = getFieldValue(obj, fields[i]);
				}
				return values;
			}
		}
		return null;
	}
1247796
public static Map<String, Object> getProperties(Object obj) {
		Map<String, Object> map = new HashMap<String, Object>();

		Class<?> objClass = obj.getClass();

		// Get all fields
		for (Field field : objClass.getFields()) {
			try {
				if (matchField(field, field.getName())) {
					String name = field.getName();
					Object value = field.get(obj);
					map.put(name, value);
				}
			} catch (Throwable t) {
				// Ignore exception
			}
		}

		// Get all properties
		for (Method method : objClass.getMethods()) {
			try {
				if (method.getName().startsWith("get") && matchPropertyGetter(method, method.getName())) {
					String name = method.getName().substring(3);
					name = name.substring(0, 1).toLowerCase() + name.substring(1);
					Object value = method.invoke(obj);
					map.put(name, value);
				}
			} catch (Throwable t) {
				// Ignore exception
			}
		}

		return map;
	}
608159
@Override
	@SuppressWarnings("unchecked")
	@Pure
	public int indexOf(Object obj) {
		if (obj == null) {
			return -1;
		}
		final P element;
		try {
			element = (P) obj;
		} catch (ClassCastException exception) {
			return -1;
		}
		final Iterator<P> iter = this.tree.dataDepthFirstIterator();
		P data;
		int idx = 0;
		while (iter.hasNext()) {
			data = iter.next();
			if (data == element) {
				return idx;
			}
			++idx;
		}
		return -1;
	}
1186997
function getColor (obj) {
  var color = this.theme.types.color
  if (obj.isEnumType && !this.theme.enums.hide) {
    color = this.theme.enums.color
  } else if (obj.isInputType && !this.theme.inputs.hide) {
    color = this.theme.inputs.color
  } else if (obj.isInterfaceType && !this.theme.interfaces.hide) {
    color = this.theme.interfaces.color
  } else if (obj.isUnionType && !this.theme.unions.hide) {
    color = this.theme.unions.color
  }
  return color
}
8485
protected Integer findOrder(Object obj) {
		return (obj instanceof Ordered ? ((Ordered) obj).getOrder() : null);
	}
642559
function _flags() {
	  var that = _anObject(this);
	  var result = '';
	  if (that.global) result += 'g';
	  if (that.ignoreCase) result += 'i';
	  if (that.multiline) result += 'm';
	  if (that.unicode) result += 'u';
	  if (that.sticky) result += 'y';
	  return result;
	}
1021928
public <T> Iterator<T> getBshIterator(final Enumeration<T> obj) {
        return Collections.list(obj).iterator();
    }
625641
public function pegaAtributosDoObjeto($obj)
    {
        $properties      = [];
        $reflectionClass = new ReflectionClass($obj);
        $propriedades    = $reflectionClass->getProperties(
            ReflectionProperty::IS_PUBLIC |
            ReflectionProperty::IS_PROTECTED | 
            ReflectionProperty::IS_PRIVATE
        );
     
        $iterator = 0;
        $limit    = count($propriedades);
        for ($iterator = 0; $iterator < $limit; $iterator++) {
            $properties[$iterator] = $propriedades[$iterator]->name;
        }

        return $properties;
    }
830576
@Override
    public void visitCode(Code obj) {
        Method m = getMethod();

        if (overloadedMethods.contains(m)) {
            return;
        }

        int aFlags = m.getAccessFlags();
        if ((((aFlags & Const.ACC_PRIVATE) != 0) || ((aFlags & Const.ACC_STATIC) != 0)) && ((aFlags & Const.ACC_SYNTHETIC) == 0)
                && (!m.getSignature().endsWith(")Z"))) {
            stack.resetForMethodEntry(this);
            returnRegister = Values.NEGATIVE_ONE;
            returnConstant = null;
            registerConstants.clear();
            returnPC = -1;

            try {
                super.visitCode(obj);
                if ((returnConstant != null)) {
                    BugInstance bi = new BugInstance(this, BugType.MRC_METHOD_RETURNS_CONSTANT.name(),
                            ((aFlags & Const.ACC_PRIVATE) != 0) ? NORMAL_PRIORITY : LOW_PRIORITY).addClass(this).addMethod(this);
                    if (returnPC >= 0) {
                        bi.addSourceLine(this, returnPC);
                    }

                    bi.addString(returnConstant.toString());
                    bugReporter.reportBug(bi);
                }
            } catch (StopOpcodeParsingException e) {
                // method was not suspect
            }
        }
    }
79443
public static ASN1OctetString getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof ASN1OctetString)
        {
            return (ASN1OctetString)obj;
        }

        if (obj instanceof ASN1TaggedObject)
        {
            return getInstance(((ASN1TaggedObject)obj).getObject());
        }

        if (obj instanceof ASN1Sequence)
        {
            Vector      v = new Vector();
            Enumeration e = ((ASN1Sequence)obj).getObjects();

            while (e.hasMoreElements())
            {
                v.addElement(e.nextElement());
            }

            return new BERConstructedOctetString(v);
        }

        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
    }
734923
public static ASN1Sequence getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof ASN1Sequence)
        {
            return (ASN1Sequence)obj;
        }

        throw new IllegalArgumentException("unknown object in getInstance");
    }
89250
@SuppressWarnings("unchecked")
    public BeanDesc getBeanDesc(Object obj){
        if(obj instanceof Map){
            return new MapBeanDescImpl((Map<String, Object>) obj);
        } else {
            return getBeanDesc(obj.getClass());
        }
    }
623059
private Object propertyObj(Object obj, Element node) throws Exception {
		String id = getAttribute(node, "id");
		String name = getAttribute(node, "name");
		String defval = getAttribute(node, "default");
		Object prop = null;
		if (_propertyMap != null && _propertyMap.containsKey(name)) {
			prop = _propertyMap.get(name);
		} else {
			prop = defval;
		}
		if (id != null) {
			_idMap.put(id, prop);
		}
		if (prop != null) {
			configure(prop, node, 0);
		}
		return prop;
	}
478397
public int indexOf( T obj ) {
		for (int i = 0; i < size; i++) {
			if( data[i].equals(obj) ) {
				return i;
			}
		}
		return -1;
	}