Coverage Report - org.apache.tapestry.annotations.AnnotationMessages
 
Classes in this File Line Coverage Branch Coverage Complexity
AnnotationMessages
0%
0/20
N/A
1
 
 1  
 // Copyright 2005 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.tapestry.annotations;
 16  
 
 17  
 import java.lang.annotation.Annotation;
 18  
 import java.lang.reflect.Method;
 19  
 
 20  
 import org.apache.hivemind.Location;
 21  
 import org.apache.hivemind.impl.MessageFormatter;
 22  
 import org.apache.hivemind.service.ClassFabUtils;
 23  
 
 24  
 /**
 25  
  * @author Howard M. Lewis Ship
 26  
  * @since 4.0
 27  
  */
 28  
 
 29  
 final class AnnotationMessages
 30  
 {
 31  0
     private static final MessageFormatter _formatter = new MessageFormatter(
 32  
             AnnotationMessages.class);
 33  
     
 34  
     /* defeat instantiation */
 35  0
     private AnnotationMessages() { }
 36  
     
 37  
     static String noParametersExpected(Method m)
 38  
     {
 39  0
         return _formatter.format("no-parameters-expected", m);
 40  
     }
 41  
 
 42  
     static String notAccessor(Method method)
 43  
     {
 44  0
         return _formatter.format("no-accessor", method);
 45  
     }
 46  
 
 47  
     static String voidAccessor(Method method)
 48  
     {
 49  0
         return _formatter.format("void-accessor", method);
 50  
     }
 51  
 
 52  
     static String nonVoidMutator(Method method)
 53  
     {
 54  0
         return _formatter.format("non-void-mutator", method);
 55  
     }
 56  
 
 57  
     static String wrongParameterCount(Method method)
 58  
     {
 59  0
         return _formatter.format("wrong-parameter-count", method);
 60  
     }
 61  
 
 62  
     static String failureProcessingAnnotation(Annotation annotation, Method method, Throwable cause)
 63  
     {
 64  0
         return _formatter.format("failure-processing-annotation", annotation, method, cause);
 65  
     }
 66  
 
 67  
     static String failureProcessingClassAnnotation(Annotation annotation, Class clazz,
 68  
             Throwable cause)
 69  
     {
 70  0
         return _formatter.format(
 71  
                 "failure-processing-class-annotation",
 72  
                 annotation,
 73  
                 clazz.getName(),
 74  
                 cause);
 75  
     }
 76  
 
 77  
     static String returnStringOnly(Class returnType)
 78  
     {
 79  0
         return _formatter.format("return-string-only", ClassFabUtils.getJavaClassName(returnType));
 80  
     }
 81  
 
 82  
     static String bindingWrongFormat(String binding)
 83  
     {
 84  0
         return _formatter.format("binding-wrong-format", binding);
 85  
     }
 86  
 
 87  
     static String methodAnnotation(Annotation annotation, Method method)
 88  
     {
 89  0
         return _formatter.format("method-annotation", annotation, method);
 90  
     }
 91  
 
 92  
     static String classAnnotation(Annotation annotation, Class clazz)
 93  
     {
 94  0
         return _formatter.format("class-annotation", annotation, clazz.getName());
 95  
     }
 96  
 
 97  
     static String missingEqualsInMeta(String value)
 98  
     {
 99  0
         return _formatter.format("missing-equals-in-meta", value);
 100  
     }
 101  
 
 102  
     static String failureEnhancingMethod(Method method, Exception cause)
 103  
     {
 104  0
         return _formatter.format("failure-enhancing-method", method, cause);
 105  
     }
 106  
     
 107  
     static String targetsNotFound(Method method)
 108  
     {
 109  0
         return _formatter.format("no-targets-found", method);
 110  
     }
 111  
     
 112  
     static String invalidAnnotationInClass(Class annotation, Class clazz)
 113  
     {
 114  0
         return _formatter.format("invalid-annotation-in-class", annotation.getName(), clazz.getName());
 115  
     }  
 116  
     
 117  
     static String unableToCopy(String id)
 118  
     {
 119  0
         return _formatter.format("unable-to-copy", id);
 120  
     }
 121  
     
 122  
     static String bothTypeAndCopyOf(String id)
 123  
     {
 124  0
         return _formatter.format("both-type-and-copy-of", id);
 125  
     }  
 126  
     
 127  
     static String unknownAsset(String name, Location l)
 128  
     {
 129  0
         return _formatter.format("missing-asset-property", name, l);
 130  
     }
 131  
 }