fix javadoc and formatting
add recursive generic to PartialComponent to avoid casting