• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java StripesRuntimeException类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中net.sourceforge.stripes.exception.StripesRuntimeException的典型用法代码示例。如果您正苦于以下问题:Java StripesRuntimeException类的具体用法?Java StripesRuntimeException怎么用?Java StripesRuntimeException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

StripesRuntimeException类属于net.sourceforge.stripes.exception包,在下文中一共展示了StripesRuntimeException类的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getSingleItemTypeConverter

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
    * Fetches an instance of {@link TypeConverter} that can be used to convert the individual
    * items split out of the input String. By default uses the {@link TypeConverterFactory} to
    * find an appropriate {@link TypeConverter}.
    *
    * @param targetType the type that each item should be converted to.
    * @return a TypeConverter for use in converting each individual item.
    */
   @SuppressWarnings("unchecked")
protected TypeConverter getSingleItemTypeConverter(Class targetType) {
       try {
           TypeConverterFactory factory = StripesFilter.getConfiguration().getTypeConverterFactory();
           return factory.getTypeConverter(targetType, this.locale);
       }
       catch (Exception e) {
           throw new StripesRuntimeException(
                   "You are using the OneToManyTypeConverter to convert a String to a List of " +
                           "items for which there is no registered converter! Please check that the " +
                           "TypeConverterFactory knows how to make a converter for: " +
                           targetType, e
           );
       }
   }
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:24,
代码来源:OneToManyTypeConverter.java

示例2: format

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Attempts to format an object using the Stripes formatting system.  If no formatter can
 * be found, then a simple String.valueOf(input) will be returned.  If the value passed in
 * is null, then the empty string will be returned.
 * 
 * @param input The object to be formatted
 * @param forOutput If true, then the object will be formatted for output to the JSP. Currently,
 *            that means that if encryption is enabled for the ActionBean property with the same
 *            name as this tag then the formatted value will be encrypted before it is returned.
 */
@SuppressWarnings("unchecked")
protected String format(Object input, boolean forOutput) {
    if (input == null) {
        return "";
    }

    // format the value
    FormatterFactory factory = StripesFilter.getConfiguration().getFormatterFactory();
    Formatter formatter = factory.getFormatter(input.getClass(),
                                               getPageContext().getRequest().getLocale(),
                                               this.formatType,
                                               this.formatPattern);
    String formatted = (formatter == null) ? String.valueOf(input) : formatter.format(input);

    // encrypt the formatted value if required
    if (forOutput && formatted != null) {
        try {
            ValidationMetadata validate = getValidationMetadata();
            if (validate != null && validate.encrypted())
                formatted = CryptoUtil.encrypt(formatted);
        }
        catch (JspException e) {
            throw new StripesRuntimeException(e);
        }
    }

    return formatted;
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:39,
代码来源:InputTagSupport.java

示例3: setPageContext

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
@Override
public void setPageContext(PageContext pageContext) {
    // Call super method
    super.setPageContext(pageContext);
    
    // Initialize layout context and related fields
    context = LayoutContext.lookup(pageContext);

    if (context == null || getLayoutParent() != null) {
        throw new StripesRuntimeException("The JSP page " + getCurrentPagePath()
                + " contains a layout-definition tag and was invoked directly. "
                + "A layout-definition can only be invoked by a page that contains "
                + "a layout-render tag.");
    }

    renderPhase = context.isComponentRenderPhase();
    silent = context.getOut().isSilent();
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:19,
代码来源:LayoutDefinitionTag.java

示例4: setPageContext

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
@Override
public void setPageContext(PageContext pageContext) {
    // Call super method
    super.setPageContext(pageContext);

    // Initialize the layout context and related fields
    context = LayoutContext.lookup(pageContext);

    if (context == null) {
        throw new StripesRuntimeException("A component tag named \"" + getName() + "\" in "
                + getCurrentPagePath() + " was unable to find a layout context.");
    }

    log.trace("Component ", getName() + " has context ", context.getRenderPage(), " -> ",
            context.getDefinitionPage());

    silent = context.getOut().isSilent();
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:19,
代码来源:LayoutComponentTag.java

示例5: initDefaultValueWithDefaultHandlerIfNeeded

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Ensure the default event name is set if the binding uses the $event parameter.
 * Can only be done safely after the event mappings have been processed.
 * see http://www.stripesframework.org/jira/browse/STS-803
 */
void initDefaultValueWithDefaultHandlerIfNeeded(ActionResolver actionResolver) {
    if (PARAMETER_NAME_EVENT.equals(name)) {
        Method defaultHandler;
        try {
            defaultHandler = actionResolver.getDefaultHandler(beanClass);
        } catch (StripesServletException e) {
            throw new StripesRuntimeException("Caught an exception trying to get default handler for ActionBean '" + beanClass.getName() +
                    "'. Make sure this ActionBean has a default handler.", e);
        }
        HandlesEvent annotation = defaultHandler.getAnnotation(HandlesEvent.class);
        if (annotation != null) {
            this.defaultValue = annotation.value();
        } else {
            this.defaultValue = defaultHandler.getName();
        }
    }
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:23,
代码来源:UrlBindingParameter.java

示例6: getEventNameFromRequestParams

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Loops through the set of known events for the ActionBean to see if the event
 * names are present as parameter names in the request.  Returns the first event
 * name found in the request, or null if none is found.
 *
 * @param bean the ActionBean type bound to the request
 * @param context the ActionBeanContext for the current request
 * @return String the name of the event submitted, or null if none can be found
 */
@SuppressWarnings("unchecked")
protected String getEventNameFromRequestParams(Class<? extends ActionBean> bean,
                                               ActionBeanContext context) {

    List<String> eventParams = new ArrayList<String>();
    Map<String,String[]> parameterMap = context.getRequest().getParameterMap();
    for (String event : this.eventMappings.get(bean).keySet()) {
        if (parameterMap.containsKey(event) || parameterMap.containsKey(event + ".x")) {
            eventParams.add(event);
        }
    }

    if (eventParams.size() == 0) {
        return null;
    }
    else if (eventParams.size() == 1) {
        return eventParams.get(0);
    }
    else {
        throw new StripesRuntimeException("Multiple event parameters " + eventParams
                + " are present in this request. Only one event parameter may be specified "
                + "per request. Otherwise, Stripes would be unable to determine which event "
                + "to execute.");
    }
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:35,
代码来源:AnnotatedClassActionResolver.java

示例7: findClasses

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Helper method to find implementations of ActionBean in the packages specified in
 * Configuration using the {@link ResolverUtil} class.
 *
 * @return a set of Class objects that represent subclasses of ActionBean
 */
protected Set<Class<? extends ActionBean>> findClasses() {
    BootstrapPropertyResolver bootstrap = getConfiguration().getBootstrapPropertyResolver();

    String packages = bootstrap.getProperty(PACKAGES);
    if (packages == null) {
        throw new StripesRuntimeException(
            "You must supply a value for the configuration parameter '" + PACKAGES + "'. The " +
            "value should be a list of one or more package roots (comma separated) that are " +
            "to be scanned for ActionBean implementations. The packages specified and all " +
            "subpackages are examined for implementations of ActionBean."
        );
    }

    String[] pkgs = StringUtil.standardSplit(packages);
    ResolverUtil<ActionBean> resolver = new ResolverUtil<ActionBean>();
    resolver.findImplementations(ActionBean.class, pkgs);
    return resolver.getClasses();
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:25,
代码来源:AnnotatedClassActionResolver.java

示例8: getFieldsPresentInfo

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * In a lot of cases (and specifically during wizards) the Stripes form field writes out a
 * hidden field containing a set of field names. This is encrypted to stop the user from
 * monkeying with it. This method retrieves the list of field names, decrypts it and splits it
 * out into a Collection of field names.
 * 
 * @param bean the current ActionBean
 * @return a non-null (though possibly empty) list of field names
 */
protected Collection<String> getFieldsPresentInfo(ActionBean bean) {
    ActionBeanContext ctx = bean.getContext();
    String fieldsPresent = ctx.getRequest().getParameter(StripesConstants.URL_KEY_FIELDS_PRESENT);
    Wizard wizard = bean.getClass().getAnnotation(Wizard.class);
    boolean isWizard = wizard != null;

    if (fieldsPresent == null || "".equals(fieldsPresent)) {
        if (isWizard && !CollectionUtil.contains(wizard.startEvents(), ctx.getEventName())) {
            throw new StripesRuntimeException(
                    "Submission of a wizard form in Stripes absolutely requires that "
                            + "the hidden field Stripes writes containing the names of the fields "
                            + "present on the form is present and encrypted (as Stripes write it). "
                            + "This is necessary to prevent a user from spoofing the system and "
                            + "getting around any security/data checks.");
        }
        else {
            return Collections.emptySet();
        }
    }
    else {
        fieldsPresent = CryptoUtil.decrypt(fieldsPresent);
        return HtmlUtil.splitValues(fieldsPresent);
    }
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:34,
代码来源:DefaultActionBeanPropertyBinder.java

示例9: getClassPropertyList

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Attempts to find all classes the user has specified in web.xml.
 * 
 * @param paramName the parameter to look for in web.xml
 * @return a List of classes found
 */
public List<Class<?>> getClassPropertyList(String paramName)
{
    List<Class<?>> classes = new ArrayList<Class<?>>();

    String classList = getProperty(paramName);

    if (classList != null) {
        String[] classNames = StringUtil.standardSplit(classList);
        for (String className : classNames) {
            className = className.trim();
            try {
                classes.add(ReflectUtil.findClass(className));
            }
            catch (ClassNotFoundException e) {
                throw new StripesRuntimeException("Could not find class [" + className
                        + "] specified by the configuration parameter [" + paramName
                        + "]. This value must contain fully qualified class names separated "
                        + " by commas.");
            }
        }
    }

    return classes;
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:31,
代码来源:BootstrapPropertyResolver.java

示例10: initInterceptors

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Splits a comma-separated list of class names and maps each {@link LifecycleStage} to the
 * interceptors in the list that intercept it. Also automatically finds Interceptors in
 * packages listed in {@link BootstrapPropertyResolver#PACKAGES} if searchExtensionPackages is true.
 * 
 * @return a Map of {@link LifecycleStage} to Collection of {@link Interceptor}
 */
@SuppressWarnings("unchecked")
protected Map<LifecycleStage, Collection<Interceptor>> initInterceptors(List classes) {

    Map<LifecycleStage, Collection<Interceptor>> map = new HashMap<LifecycleStage, Collection<Interceptor>>();

    for (Object type : classes) {
        try {
            Interceptor interceptor = getObjectFactory().newInstance(
                    (Class<? extends Interceptor>) type);
            addInterceptor(map, interceptor);
        }
        catch (Exception e) {
            throw new StripesRuntimeException("Could not instantiate configured Interceptor ["
                    + type.getClass().getName() + "].", e);
        }
    }

    return map;
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:27,
代码来源:RuntimeConfiguration.java

示例11: newInstance

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
@Override
public <T> T newInstance(Class<T> clazz) {
    try {
        Set<Class<?>> interfaces = ReflectUtil.getImplementedInterfaces(clazz);

        if (interfaces == null || interfaces.size() == 0 || !interfaces.contains(ActionBean.class)) {
            return super.newInstance(clazz);
        }

        Injector injector = ModuleInjector.get();

        if (clazz.isInterface())
            return postProcess(newInterfaceInstance(clazz));
        else
            return postProcess(injector.getInstance(clazz));
    } catch (Throwable t) {
        throw new StripesRuntimeException("Could not instantiate " + clazz, t);
    }
}
 

开发者ID:geetools,
项目名称:geeCommerce-Java-Shop-Software-and-PIM,
代码行数:20,
代码来源:GuiceObjectFactory.java

示例12: findClasses

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Helper method to find implementations of ActionBean in the packages
 * specified in Configuration using the {@link ResolverUtil} class.
 * 
 * @return a set of Class objects that represent subclasses of ActionBean
 */
protected Set<Class<? extends ActionBean>> findClasses() {
    BootstrapPropertyResolver bootstrap = getConfiguration().getBootstrapPropertyResolver();

    String packages = bootstrap.getProperty(PACKAGES);
    if (packages == null) {
        throw new StripesRuntimeException("You must supply a value for the configuration parameter '" + PACKAGES
            + "'. The " + "value should be a list of one or more package roots (comma separated) that are "
            + "to be scanned for ActionBean implementations. The packages specified and all "
            + "subpackages are examined for implementations of ActionBean.");
    }

    String[] pkgs = StringUtil.standardSplit(packages);
    ResolverUtil<ActionBean> resolver = new ResolverUtil<ActionBean>();
    resolver.findImplementations(ActionBean.class, pkgs);
    return resolver.getClasses();
}
 

开发者ID:geetools,
项目名称:geeCommerce-Java-Shop-Software-and-PIM,
代码行数:23,
代码来源:AnnotatedClassActionResolver.java

示例13: evaluateRoleExpression

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Evaluate the given EL expression using the current action bean to resolve variables.
 *
 * @param bean       the bean to evaluate the expression on
 * @param expression the EL expression to evaluate
 * @return the result of the EL expression
 */
private Object evaluateRoleExpression(ActionBean bean, String expression)
{
	try
	{
		LOG.debug("Evaluating expression: '" + expression + '\'');

		// This is somewhat of a hack until the ExpressionEvaluator becomes more accessible.
		ParameterName name = new ParameterName("security");
		List<Object> values = new ArrayList<Object>();
		values.add(null);
		ValidationMetadata metadata = new ValidationMetadata("security").expression(expression);
		ValidationErrors errors = new ValidationErrors();

		ExpressionValidator.evaluate(bean, name, values, metadata, errors);

		return errors.isEmpty();
	}
	catch (Exception exc)
	{
		throw new StripesRuntimeException(exc);
	}
}
 

开发者ID:StripesFramework,
项目名称:stripes-stuff,
代码行数:30,
代码来源:InstanceBasedSecurityManager.java

示例14: bindingPolicyEnforcement

点赞 3

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
@Test(groups = "fast")
public void bindingPolicyEnforcement() {
    try {
        evaluate(new NoAnnotation());
        evaluate(new DefaultAnnotation());
        evaluate(new ImplicitDeny());
        evaluate(new ExplicitDeny());
        evaluate(new ImplicitAllow());
        evaluate(new HonorValidateAnnotations());
        evaluate(new OverrideValidateAnnotations());
    }
    catch (Exception e) {
        StripesRuntimeException re = new StripesRuntimeException(e.getMessage(), e);
        re.setStackTrace(e.getStackTrace());
        throw re;
    }
}
 

开发者ID:scarcher2,
项目名称:stripes,
代码行数:18,
代码来源:BindingSecurityTests.java

示例15: build

点赞 2

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Causes the JsonBuilder to navigate the properties of the supplied object
 * and convert them to JSON
 *
 * @return JSON version of the Java object supplied to the builder.
 */
public String build()
{
    try
    {
        // Create the Javascript enging to be used for JSON conversion
        String javascriptString = javascriptBuilder.build();
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("JavaScript");

        // Convert the root object to Javascript, and then take the 
        // Javascript representation and convert it to JSON
        // using the Rhino scripting engine within the JDK
        StringBuilder jsonStringBuilder = new StringBuilder();
        engine.put("jsonStringBuilder", jsonStringBuilder);
        engine.eval(javascriptString + "; jsonString = JSON.stringify(" + javascriptBuilder.getRootVariableName() + ", undefined, 2); jsonStringBuilder.append( jsonString );");

        return jsonStringBuilder.toString();
    }
    catch ( Exception e )
    {
        throw new StripesRuntimeException("Could not build JSON for object. An "
                + "exception was thrown while trying to convert a property from Java to "
                + "JSON. The object being converted is: " + javascriptBuilder.getRootVariableName() );
    }

}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:33,
代码来源:JsonBuilder.java

示例16: getFields

点赞 2

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Fetches the fields on a class that are annotated with SpringBean. The first time it
 * is called for a particular class it will introspect the class and cache the results.
 * All non-overridden fields are examined, including protected and private fields.
 * If a field is not public an attempt it made to make it accessible - if it fails
 * it is removed from the collection and an error is logged.
 *
 * @param clazz the class on which to look for SpringBean annotated fields
 * @return the collection of methods with the annotation
 */
protected static Collection<Field> getFields(Class<?> clazz) {
    Collection<Field> fields = fieldMap.get(clazz);
    if (fields == null) {
        fields = ReflectUtil.getFields(clazz);
        Iterator<Field> iterator = fields.iterator();

        while (iterator.hasNext()) {
            Field field = iterator.next();
            if (!field.isAnnotationPresent(SpringBean.class)) {
                iterator.remove();
            }
            else if (!field.isAccessible()) {
                // If the field isn't public, try to make it accessible
                try {
                    field.setAccessible(true);
                }
                catch (SecurityException se) {
                    throw new StripesRuntimeException(
                        "Field " + clazz.getName() + "." + field.getName() + "is marked " +
                        "with @SpringBean and is not public. An attempt to call " +
                        "setAccessible(true) resulted in a SecurityException. Please " +
                        "either make the field public, annotate a public setter instead " +
                        "or modify your JVM security policy to allow Stripes to " +
                        "setAccessible(true).", se);
                }
            }
        }

        fieldMap.put(clazz, fields);
    }

    return fields;
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:44,
代码来源:SpringHelper.java

示例17: findSpringBean

点赞 2

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Looks up a Spring managed bean from an Application Context. First looks for a bean
 * with name specified. If no such bean exists, looks for a bean by type. If there is
 * only one bean of the appropriate type, it is returned. If zero or more than one bean
 * of the correct type exists, an exception is thrown.
 *
 * @param ctx the Spring Application Context
 * @param name the name of the spring bean to look for
 * @param type the type of bean to look for
 * @param allowFindByType true to indicate that finding a bean by type is acceptable
 *        if find by name fails.
 * @exception RuntimeException various subclasses of RuntimeException are thrown if it
 *            is not possible to find a unique matching bean in the spring context given
 *            the constraints supplied.
 */
public static Object findSpringBean(ApplicationContext ctx,
                                       String name,
                                       Class<?> type,
                                       boolean allowFindByType) {
    // First try to lookup using the name provided
    try {
        Object bean = ctx.getBean(name, type);
        if (bean != null) {
            log.debug("Found spring bean with name [", name, "] and type [", bean.getClass()
                    .getName(), "]");
        }
        return bean;
    }
    catch (NestedRuntimeException nre) {
        if (!allowFindByType) throw nre;
    }

    // If we got here then we didn't find a bean yet, try by type
    String[] beanNames = ctx.getBeanNamesForType(type);
    if (beanNames.length == 0) {
        throw new StripesRuntimeException(
            "Unable to find SpringBean with name [" + name + "] or type [" +
            type.getName() + "] in the Spring application context.");
    }
    else if (beanNames.length > 1) {
        throw new StripesRuntimeException(
            "Unable to find SpringBean with name [" + name + "] or unique bean with type [" +
            type.getName() + "] in the Spring application context. Found " + beanNames.length +
            "beans of matching type.");
    }
    else {
        log.debug("Found unique SpringBean with type [" + type.getName() + "]. Matching on ",
                 "type is a little risky so watch out!");
        return ctx.getBean(beanNames[0], type);
    }
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:52,
代码来源:SpringHelper.java

示例18: getTagErrorRenderer

点赞 2

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Returns a new instance of the configured renderer that is ready for use. By default
 * returns an instance of {@link DefaultTagErrorRenderer}. If a custom class is configured
 * and cannot be instantiated, an exception will be thrown.
 */
public TagErrorRenderer getTagErrorRenderer(InputTagSupport tag) {
    try {
        TagErrorRenderer renderer = getConfiguration().getObjectFactory().newInstance(
                this.rendererClass);
        renderer.init(tag);
        return renderer;
    }
    catch (Exception e) {
        throw new StripesRuntimeException("Could not create an instance of the configured " +
            "TagErrorRenderer class '" + this.rendererClass.getName() + "'. Please check " +
            "that the class is public and has a no-arg public constructor.", e);
    }
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:19,
代码来源:DefaultTagErrorRendererFactory.java

示例19: closeBuffer

点赞 2

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Flush the page context's output buffer and resume sending output to the writer that was
 * receiving output prior to calling {@link #openBuffer(PageContext)}.
 * 
 * @return The buffer's contents.
 */
public String closeBuffer(PageContext pageContext) {
    if (getOut() instanceof StringWriter) {
        tryFlush(pageContext);
        String contents = ((StringWriter) writers.poll()).toString();
        log.trace("Closed buffer: \"", contents, "\"");
        return contents;
    }
    else {
        throw new StripesRuntimeException(
                "Attempt to close a buffer without having first called openBuffer(..)!");
    }
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:19,
代码来源:LayoutWriter.java

示例20: clear

点赞 2

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/**
 * Calls {@link JspWriter#clear()} on the wrapped JSP writer.
 * 
 * @throws IOException
 */
public void clear() throws IOException {
    Writer out = getOut();
    if (out instanceof JspWriter) {
        ((JspWriter) out).clear();
    }
    else if (out instanceof StringWriter) {
        ((StringWriter) out).getBuffer().setLength(0);
    }
    else {
        throw new StripesRuntimeException("How did I get a writer of type "
                + out.getClass().getName() + "??");
    }
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:19,
代码来源:LayoutWriter.java

示例21: isChildOfCurrentComponent

点赞 2

import net.sourceforge.stripes.exception.StripesRuntimeException; //导入依赖的package包/类
/** Returns true if this tag is a child of the current component tag. */
public boolean isChildOfCurrentComponent() {
    try {
        LayoutTag parent = getLayoutParent();
        return parent instanceof LayoutComponentTag
                && ((LayoutComponentTag) parent).isCurrentComponent();
    }
    catch (StripesJspException e) {
        // This exception would have been thrown before this tag ever executed
        throw new StripesRuntimeException("Something has happened that should never happen", e);
    }
}
 

开发者ID:nkasvosve,
项目名称:beyondj,
代码行数:13,
代码来源:LayoutRenderTag.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)