2013-02-03 Andrew John Hughes * javax/lang/model/util/ElementFilter.java: (constructorsIn(Set)): Implemented. (fieldsIn(Set)): Likewise. (methodsIn(Set)): Likewise. (packagesIn(Set)): Likewise. 2013-02-01 Andrew John Hughes * javax/lang/model/element/ElementKind.java: (ANNOTATION_TYPE): Documented. (CLASS): Likewise. (CONSTRUCTOR): Likewise. (ENUM): Likewise. (ENUM_CONSTANT): Likewise. (EXCEPTION_PARAMETER): Likewise. (FIELD): Likewise. (INSTANCE_INIT): Likewise. (INTERFACE): Likewise. (LOCAL_VARIABLE): Likewise. (METHOD): Likewise. (OTHER): Likewise. (PACKAGE): Likewise. (PARAMETER): Likewise. (STATIC_INIT): Likewise. (TYPE_PARAMETER): Likewise. (isClass()): Implemented. (isField()): Likewise. (isInterface()): Likewise. 2013-02-01 Andrew John Hughes The type of element should be determined by its kind, not by the class. * javax/lang/model/util/ElementFilter.java: (typesIn(Set)): Pass list of type kinds to FilteredSet constructor, rather than TypeElement.class. (ElementFilter.clazz): Removed. (ElementFilter.kinds): Added. (FilteredSet(Set,ElementKind...)): Take a varargs list of ElementKinds rather than a class. (FilteredSet.contains(Object)): Make test dependent on whether the element's kind is in the array of kinds, not whether it is an instance of a class. (FilteredSet.iterator()): Use new FilteredIterator constructor. (FilteredSet.remove(Object)): Call contains to check if filtered out or not. (FilteredSet.size()): Replace isInstance with binary search of kinds array. (FilteredSet.toArray(T[])): Cast to Object[] to populate array to avoid warning. (FilteredSet.toString()): Return normal toString() output for a collection using the filtered iterator. (FilteredIterator.clazz): Removed. (FilteredIterator.kinds): Added. (FilteredIterator.next): Set type to Element not E. (FilteredIterator(Iterator, ElementKind...)): Again, use varargs list of ElementKinds rather than class. (FilteredIterator.hasNext()): Replace instanceof with binary search. (FilteredIterator.next()): Suppress warnings when casting to E. Safe as we know it's an E via the kind test. 2013-01-04 Andrew John Hughes * javax/lang/model/element/AnnotationValueVisitor.java: (visitUnknown(AnnotationValue,P)): Mention throwing of UnknownAnnotationValueException in documentation. * javax/lang/model/element/ElementVisitor.java: (visitUnknown(Element,P)): Likewise for UnknownElementException. * javax/lang/model/element/UnknownAnnotationValueException.java: Implemented. (serialVersionUID): New field. (annValue): Likewise. (param): Likewise. (UnknownAnnotationValueException(AnnotationValue,Object)): Implemented. (getArgument()): Likewise. (getUnknownAnnotationValue()): Likewise. * javax/lang/model/element/UnknownElementException.java, Implemented. (serialVersionUID): New field. (element): Likewise. (param): Likewise. (UnknownElementException(Element,Object)): Implemented. (getArgument()): Likewise. (getUnknownElement()): Likewise. * javax/lang/model/type/MirroredTypeException.java, Implemented. (serialVersionUID): New field. (mirror): Likewise. (MirroredTypeException(TypeMirror)): Implemented. (getTypeMirror()): Likewise. * javax/lang/model/type/MirroredTypesException.java, Implemented. (serialVersionUID): New field. (mirrors): Likewise. (MirroredTypeException(List)): Implemented. (getTypeMirrors()): Likewise. * javax/lang/model/type/TypeVisitor.java, (visitUnknown(TypeMirror,P)): Mention throwing of UnknownTypeException in documentation. * javax/lang/model/type/UnknownTypeException.java, Implemented. (serialVersionUID): New field. (type): Likewise. (param): Likewise. (UnknownTypeException(TypeMirror,Object)): Implemented. (getArgument()): Likewise. (getUnknownType()): Likewise. 2012-12-28 Andrew John Hughes * gnu/xml/validation/datatype/AnySimpleType.java: (AnySimpleType()): Remove unneeded cast. * gnu/xml/validation/datatype/AtomicSimpleType.java: (AtomicSimpleType(QName,Set,int,SimpleType, Annotation)): Add type parameter to Set. * gnu/xml/validation/datatype/BooleanType.java: (VALUE_SPACE): Likewise. * gnu/xml/validation/datatype/DoubleType.java: (SPECIAL): Likewise. * gnu/xml/validation/datatype/DurationType.java: (Duration): Implement Comparable not Comparable. (Duration.hashCode()): Add @Override. (Duration.equals(Object)): Likewise. (Duration.compareTo(Duration)): Likewise and use specific type, which also fixes issue with it returning 0 for other objects, rather than throwing a ClassCastException. (createValue(String,ValidationContext)): Remove unused months field. Set duration.years from years. * gnu/xml/validation/datatype/FloatType.java: (SPECIAL): Add type parameter. * gnu/xml/validation/datatype/GDayType.java, (GDay): Implement Comparable not Comparable. (GDay.hashCode()): Add @Override. (GDay.equals(Object)): Likewise. (GDay.compareTo(GDay)): Likewise and use specific type, which also fixes issue with it returning 0 for other objects, rather than throwing a ClassCastException. * gnu/xml/validation/datatype/GMonthDayType.java: (GMonthDay): Implement Comparable not Comparable. (GMonthDay.hashCode()): Add @Override. (GMonthDay.equals(Object)): Likewise. (GMonthDay.compareTo(GMonthDay)): Likewise and use specific type, which also fixes issue with it returning 0 for other objects, rather than throwing a ClassCastException. * gnu/xml/validation/datatype/GMonthType.java: (GMonth): Implement Comparable not Comparable. (GMonth.hashCode()): Add @Override. (GMonth.equals(Object)): Likewise. (GMonth.compareTo(GMonth)): Likewise and use specific type, which also fixes issue with it returning 0 for other objects, rather than throwing a ClassCastException. * gnu/xml/validation/datatype/GYearMonthType.java, (GYearMonth): Implement Comparable not Comparable. (GYearMonth.hashCode()): Add @Override. (GYearMonth.equals(Object)): Likewise. (GYearMonth.compareTo(GYearMonth)): Likewise and use specific type, which also fixes issue with it returning 0 for other objects, rather than throwing a ClassCastException. * gnu/xml/validation/datatype/GYearType.java, (GYear): Implement Comparable not Comparable. (GYear.hashCode()): Add @Override. (GYear.equals(Object)): Likewise. (GYear.compareTo(GYear)): Likewise and use specific type, which also fixes issue with it returning 0 for other objects, rather than throwing a ClassCastException. * gnu/xml/validation/datatype/ListSimpleType.java: (ListSimpleType(QName,Set,int,SimpleType,Annotation, SimpleType)): Add type parameter to Set. * gnu/xml/validation/datatype/MaxExclusiveFacet.java: (matches(Object)): Use Comparable. * gnu/xml/validation/datatype/MaxInclusiveFacet.java: (matches(Object)): Likewise. * gnu/xml/validation/datatype/MinExclusiveFacet.java: (matches(Object)): Likewise. * gnu/xml/validation/datatype/MinInclusiveFacet.java: (matches(Object)): Likewise. * gnu/xml/validation/datatype/SimpleType.java: (facets): Add type parameter to Set. (SimpleType(QName,int,Set,int,SimpleType,Annotation)): Likewise. (checkValid(String,ValidationContext)): Add type parameter to Iterator and remove unnecessary cast. * gnu/xml/validation/datatype/TimeType.java: (Time): Implement Comparable