コード例 #1
0
 public MethodParameterInjection copyFrom(@NotNull BaseInjection o) {
   super.copyFrom(o);
   if (o instanceof MethodParameterInjection) {
     final MethodParameterInjection other = (MethodParameterInjection) o;
     myClassName = other.getClassName();
     myParameterMap.clear();
     for (MethodInfo info : other.myParameterMap.values()) {
       myParameterMap.put(info.methodSignature, info.copy());
     }
   }
   return this;
 }
コード例 #2
0
 @NotNull
 public String getDisplayName() {
   final String className = getClassName();
   if (StringUtil.isEmpty(className)) return "<unnamed>";
   MethodInfo singleInfo = null;
   for (MethodInfo info : myParameterMap.values()) {
     if (info.isEnabled()) {
       if (singleInfo == null) {
         singleInfo = info;
       } else {
         singleInfo = null;
         break;
       }
     }
   }
   final String name =
       singleInfo != null
           ? StringUtil.getShortName(className) + "." + singleInfo.methodName
           : StringUtil.getShortName(className);
   return /*"["+getInjectedLanguageId()+"] " +*/ name
       + " ("
       + StringUtil.getPackageName(className)
       + ")";
 }
コード例 #3
0
 public void setMethodInfos(final Collection<MethodInfo> newInfos) {
   myParameterMap.clear();
   for (MethodInfo methodInfo : newInfos) {
     myParameterMap.put(methodInfo.getMethodSignature(), methodInfo);
   }
 }