private void addToDestPackage(AbstractJavaStructure structure) {
   switch (structure.getKind()) {
     case INTERFACE:
       getDestinationPackage().getInterfaces().add((JavaInterface) structure);
       break;
     case CLASS:
       getDestinationPackage().getClasses().add((JavaClass) structure);
       break;
     case ENUM:
       getDestinationPackage().getEnums().add((JavaEnum) structure);
       break;
     case ANNOTATION:
       getDestinationPackage().getAnnotations().add((JavaAnnotation) structure);
       break;
     default:
       throw new IllegalStateException(
           "Cannot put element of kind +" + structure.getKind() + " into a package!");
   }
 }