Obtains the super type element for a given type element.

@param element The type element
@return The super type element or null if none exists
256
TypeElement superClassFor(TypeElement element) {
        TypeMirror superclass = element.getSuperclass();
        if (superclass.getKind() == TypeKind.NONE) {
            return null;
        }
        DeclaredType kind = (DeclaredType) superclass;
        return (TypeElement) kind.asElement();
    }
1067598
public static boolean isElement(Node node) {
		return (null == node) ? false : Node.ELEMENT_NODE == node.getNodeType();
	}
1255643
public CmsElementOptionButton createOptionForElement(CmsContainerPageElementPanel element) {

        if (!isOptionAvailable(element)) {
            return null;
        }
        CmsElementOptionButton button = new CmsElementOptionButton(this, element);
        button.addClickHandler(m_elementClickHandler);
        return button;
    }
662935
public static TypeMirror upperBound(Elements elements, TypeMirror type) {
    if (type.getKind() == TypeKind.WILDCARD) {
      WildcardType wildcard = (WildcardType) type;
      type = wildcard.getExtendsBound();
      if (type == null) {
        type = elements.getTypeElement(Object.class.getName()).asType();
      }
    }
    return type;
  }
140303
public boolean containsElement(Element element) {
        String deepName = getDeepName(element);
        return elementNameSortOrderMap.containsKey(deepName);
    }
1038982
public static final Element getNextSiblingElement(Node node) {
    	
    	List<Node> siblings = node.getParent().getChildren();
    	Node n = null;
    	
    	int index = siblings.indexOf(node) + 1;
    	if(index>0 && index<siblings.size()) {
	    	n = siblings.get(index);
	    	while(!(n instanceof Element) && ++index < siblings.size()) {
	    		n = siblings.get(index);
	    	}
	    	
	    	if(index==siblings.size()) {
	    		n = null;
	    	}
    	}
    	
        return (Element) n;
    }
93497
public static <E> void rootElement(WebElement root, E element) {
		if (element == null || root == null) return;
		if (element instanceof WebElement) return;
		
		for (Class<?> clazz = element.getClass(); !clazz.equals(Object.class);
				clazz = clazz.getSuperclass()) {
			
			if (Enhancer.isEnhanced(clazz)) continue;
			
			Field[] fields = clazz.getDeclaredFields();
			for (Field field : fields) {
				setRootElementField(root, element, field);
			}
		}
	}
796641
public int typeExchange(Element element) {
        TypeMirror typeMirror = element.asType();

        // Primitive
        if (typeMirror.getKind().isPrimitive()) {
            return element.asType().getKind().ordinal();
        }

        switch (typeMirror.toString()) {
            case BYTE:
                return TypeKind.BYTE.ordinal();
            case SHORT:
                return TypeKind.SHORT.ordinal();
            case INTEGER:
                return TypeKind.INT.ordinal();
            case LONG:
                return TypeKind.LONG.ordinal();
            case FLOAT:
                return TypeKind.FLOAT.ordinal();
            case DOUBEL:
                return TypeKind.DOUBLE.ordinal();
            case BOOLEAN:
                return TypeKind.BOOLEAN.ordinal();
            case CHAR:
                return TypeKind.CHAR.ordinal();
            case STRING:
                return TypeKind.STRING.ordinal();
            default:
                // Other side, maybe the PARCELABLE or SERIALIZABLE or OBJECT.
                if (types.isSubtype(typeMirror, parcelableType)) {
                    // PARCELABLE
                    return TypeKind.PARCELABLE.ordinal();
                } else if (types.isSubtype(typeMirror, serializableType)) {
                    // SERIALIZABLE
                    return TypeKind.SERIALIZABLE.ordinal();
                } else {
                    return TypeKind.OBJECT.ordinal();
                }
        }
    }
1197428
protected static Element getChildElement(final Element parent, final String tagName) {
        List<Element> elements = getElements(parent, tagName);
        if (elements.size() > 0) {
            return elements.get(0);
        } else {
            return null;
        }
    }
190604
public static String getStringValue(final Element element) {
        final StringBuilder buf = new StringBuilder();
        final NodeList children = element.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            final Node n = children.item(i);
            switch (n.getNodeType()) {
            case Node.TEXT_NODE:
                buf.append(n.getNodeValue());
                break;
            case Node.ELEMENT_NODE:
                buf.append(getStringValue((Element) n));
                break;
            }
        }
        return buf.toString();
    }
1173781
protected String getPropertyDefaultValue(AnnotatedElement element) {
        if (element.isAnnotationPresent(DefaultValue.class)) {
            return element.getAnnotation(DefaultValue.class).value();
        }
        return null;
    }
173266
private String getElementText(Element element) {
        Node node = element.getFirstChild();
        if (node == null || node.getNodeType() != Node.TEXT_NODE) {
            return null;
        }
        return node.getNodeValue().trim();
    }
227959
def element_type(self):
        
        result = conf.lib.clang_getElementType(self)
        if result.kind == TypeKind.INVALID:
            raise Exception('Element type not available on this type.')

        return result
285260
public static TypeVariableName get(TypeParameterElement element) {
    String name = element.getSimpleName().toString();
    List<? extends TypeMirror> boundsMirrors = element.getBounds();

    List<TypeName> boundsTypeNames = new ArrayList<>();
    for (TypeMirror typeMirror : boundsMirrors) {
      boundsTypeNames.add(TypeName.get(typeMirror));
    }

    return TypeVariableName.of(name, boundsTypeNames);
  }
517073
@Override
    public T element() {
        T retrievedElement = peek();

        if (retrievedElement == null) {
            throw new NoSuchElementException();
        }

        return retrievedElement;
    }
753667
public static boolean isEnum(Element element) {
		if (element == null) {
			return false;
		} else if (element.getKind() == ElementKind.ENUM) {
			return true;
		} else {
			return false;
		}
	}
721787
public long indexOf(final String element) {
        return doWithJedis(new JedisCallable<Long>() {
            @Override
            public Long call(Jedis jedis) {
                return doIndexOf(jedis, element);
            }
        });
    }