Your question is confusing. UML is a modeling language. It does not "accept" anything. Typically, diagrams have to be created manually.
Some UML-based tools allow you to upload existing Java class files, so that you can more efficiently create diagrams. In these cases, diagrams still need to be designed, but you already have the class information which came from the class file.