Coverage Report - org.apache.tapestry5.internal.transform.TransformMessages
 
Classes in this File Line Coverage Branch Coverage Complexity
TransformMessages
86%
6/7
N/A
0
 
 1  
 // Copyright 2008 The Apache Software Foundation
 2  
 //
 3  
 // Licensed under the Apache License, Version 2.0 (the "License");
 4  
 // you may not use this file except in compliance with the License.
 5  
 // You may obtain a copy of the License at
 6  
 //
 7  
 //     http://www.apache.org/licenses/LICENSE-2.0
 8  
 //
 9  
 // Unless required by applicable law or agreed to in writing, software
 10  
 // distributed under the License is distributed on an "AS IS" BASIS,
 11  
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
 // See the License for the specific language governing permissions and
 13  
 // limitations under the License.
 14  
 
 15  
 package org.apache.tapestry5.internal.transform;
 16  
 
 17  
 import java.util.List;
 18  
 
 19  
 import org.apache.tapestry5.ioc.Messages;
 20  
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 21  
 import org.apache.tapestry5.ioc.internal.util.MessagesImpl;
 22  
 import org.apache.tapestry5.runtime.Component;
 23  
 import org.apache.tapestry5.services.TransformMethodSignature;
 24  
 
 25  0
 class TransformMessages
 26  
 {
 27  2
     private static final Messages MESSAGES = MessagesImpl.forClass(TransformMessages.class);
 28  
 
 29  
     static String fieldInjectionError(String className, String fieldName, Throwable cause)
 30  
     {
 31  4
         return MESSAGES.format("field-injection-error", className, fieldName, cause);
 32  
     }
 33  
 
 34  
     static String componentNotAssignableToField(Component component, String fieldName, String fieldType)
 35  
     {
 36  2
         return MESSAGES.format("component-not-assignable-to-field", component
 37  
                 .getComponentResources().getCompleteId(), fieldName, fieldType);
 38  
     }
 39  
 
 40  
     static String cachedMethodMustHaveReturnValue(TransformMethodSignature method)
 41  
     {
 42  2
         return MESSAGES.format("cached-no-return-value", method);
 43  
     }
 44  
 
 45  
     static String cachedMethodsHaveNoParameters(TransformMethodSignature method)
 46  
     {
 47  2
         return MESSAGES.format("cached-no-parameters", method);
 48  
     }
 49  
 
 50  
     static String illegalNumberOfPageActivationContextHandlers(List<String> fields)
 51  
     {
 52  2
         return MESSAGES.format("illegal-number-of-page-activation-context-handlers", InternalUtils.joinSorted(fields));
 53  
     }
 54  
 }