private Metadata(Class<?> type2) { this.type = type2; docLocation(getDocLocationFor(type2)).name(type2.getName()).category(Categories.createDefault()) .description(UICommandMetadata.NO_DESCRIPTION).deprecated(type.getAnnotation(Deprecated.class) != null); }
/** * Create a new {@link UICommandMetadata} implementation from the given {@link UICommandMetadata} origin, and the * given {@link UICommand} type. */ public static Metadata from(UICommandMetadata origin, Class<? extends UICommand> type) { Assert.notNull(origin, "Parent UICommand must not be null."); Assert.notNull(type, "UICommand type must not be null."); Metadata metadata = new Metadata(type); metadata.docLocation(origin.getDocLocation()).name(origin.getName()).description(origin.getDescription()) .category(origin.getCategory()); return metadata; }