@Override public Object findInjectableValueId(AnnotatedMember m) { JacksonInject ann = m.getAnnotation(JacksonInject.class); if (ann == null) { return null; } /* Empty String means that we should use name of declared * value class. */ String id = ann.value(); if (id.length() == 0) { // slight complication; for setters, type if (!(m instanceof AnnotatedMethod)) { return m.getRawType().getName(); } AnnotatedMethod am = (AnnotatedMethod) m; if (am.getParameterCount() == 0) { return m.getRawType().getName(); } return am.getParameterClass(0).getName(); } return id; }
public WorkflowTemplateImpl( @JsonProperty ("key") String key, @JsonProperty ("name") String name, @JsonProperty ("workflow-bundle") String bundlePath, @JacksonInject ("plugin") Plugin plugin) { this.key = checkNotNull(key).toUpperCase(); this.name = checkNotNull(name); this.bundlePath = checkNotNull(bundlePath); this.bundleUrl = getBundleURL(plugin); }
public IssueTypeTemplateImpl( @JsonProperty ("key") String key, @JsonProperty ("name") String name, @JsonProperty ("description") String description, @JsonProperty ("icon") String iconPath, @JsonProperty ("workflow") String workflow, @JsonProperty ("sub-task") Boolean isSubtask, @JsonProperty ("screen-scheme") String screenScheme, @JacksonInject ("plugin") Plugin plugin) { this.key = checkNotNull(key).toUpperCase(); this.name = checkNotNull(name); this.description = nullToEmpty(description); this.workflow = (workflow == null) ? Optional.empty() : Optional.of(workflow.toUpperCase()); this.isSubtask = Boolean.TRUE.equals(isSubtask); this.iconPath = iconPath; this.iconUrl = getIconUrl(plugin); this.screenScheme = (screenScheme == null) ? Optional.empty() : Optional.of(screenScheme.toUpperCase()); }
@Override public Object findInjectableValueId(AnnotatedMember m) { JacksonInject ann = m.getAnnotation(JacksonInject.class); if (ann == null) { return null; } /* Empty String means that we should use name of declared * value class. */ String id = ann.value(); if (id.length() == 0) { // slight complication; for setters, type if (!(m instanceof AnnotatedMethod)) { return m.getRawType().getName(); } AnnotatedMethod am = (AnnotatedMethod) m; if (am.getParameterCount() == 0) { return m.getRawType().getName(); } return am.getParameterClass(0).getName(); } return id; }
@Override public Object findInjectableValueId(AnnotatedMember m) { JacksonInject ann = m.getAnnotation(JacksonInject.class); if (ann == null) { return null; } /* Empty String means that we should use name of declared * value class. */ String id = ann.value(); if (id.length() == 0) { // slight complication; for setters, type if (!(m instanceof AnnotatedMethod)) { return m.getRawType().getName(); } AnnotatedMethod am = (AnnotatedMethod) m; if (am.getParameterCount() == 0) { return m.getRawType().getName(); } return am.getParameterClass(0).getName(); } return id; }
@Override public Object findInjectableValueId(AnnotatedMember m) { JacksonInject ann = m.getAnnotation(JacksonInject.class); if (ann == null) { return null; } /* Empty String means that we should use name of declared * value class. */ String id = ann.value(); if (id.length() == 0) { // slight complication; for setters, type if (!(m instanceof AnnotatedMethod)) { return m.getRawType().getName(); } AnnotatedMethod am = (AnnotatedMethod) m; if (am.getParameterCount() == 0) { return m.getRawType().getName(); } return am.getParameterClass(0).getName(); } return id; }