| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 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 | |
} |