Example usage for javax.lang.model.type TypeMirror equals

List of usage examples for javax.lang.model.type TypeMirror equals

Introduction

In this page you can find the example usage for javax.lang.model.type TypeMirror equals.

Prototype

boolean equals(Object obj);

Source Link

Document

Obeys the general contract of Object#equals Object.equals .

Usage

From source file:auto.parse.processor.AutoParseProcessor.java

private boolean isSuperType(TypeMirror type, TypeMirror origClass) {
    if (origClass.equals(type)) {
        return true;
    }//from  ww w.jav  a 2 s  .c  om

    List<? extends TypeMirror> superTypes = processingEnv.getTypeUtils().directSupertypes(origClass);
    for (TypeMirror superType : superTypes) {
        if (superType.equals(type)) {
            return true;
        }
    }
    return false;
}