public static boolean isTypeDeclaration(Tree node){
switch (node.getKind()) {
case ANNOTATION_TYPE:
case CLASS:
case ENUM:
case INTERFACE:
case TYPE_PARAMETER:
    return true;
default :
  return false;
}
}

public static boolean isTypeDeclaration ( Tree node ) { switch ( node . getKind ( ) ) { case ANNOTATION_TYPE : case CLASS : case ENUM : case INTERFACE : case TYPE_PARAMETER : return true ; default : return false ; } }
determine whether the given tree represents a declaration of a type ( including type parameters ) .
