- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {OutputStreamWriter o =
OutputStream out;new OutputStreamWriter(out)
OutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
HttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
- Smart code suggestions by Codota
}
public SessionHolder(Session session) { Assert.notNull(session, "Session must not be null"); this.session = session; }
public void init() throws Exception { Assert.notNull(this.config, "cas config must be specified"); }
/** * Create a new ServletContextResource. * <p> * The Servlet spec requires that resource paths start with a slash, even if many containers * accept paths without leading slash too. Consequently, the given path will be prepended with a * slash if it doesn't already start with one. * * @param servletContext the ServletContext to load from * @param path the path of the resource */ public ServletContextResource(ServletContext servletContext, String path) { // check ServletContext Assert.notNull(servletContext, "Cannot resolve ServletContextResource without ServletContext"); this.servletContext = servletContext; // check path Assert.notNull(path, "Path is required"); String pathToUse = StringUtils.cleanPath(path); if (!pathToUse.startsWith("/")) { pathToUse = "/" + pathToUse; } this.path = pathToUse; }
/** * <p> * register. * </p> * * @param type a {@link java.lang.Class} object. * @param name a {@link java.lang.String} object. * @param args a {@link java.lang.Object} object. */ public void register(Class<?> type, String name, Object... args) { Assert.notNull(name, "class'name is null"); if (0 == args.length) { nameTypes.put(name, type); } else { // 注册bean的name和别名 BeanDefinition bd = (BeanDefinition) args[0]; definitionRegistry.registerBeanDefinition(name, bd); // for list(a.class,b.class) binding usage String alias = bd.getBeanClassName(); if (bd.isSingleton() && !name.equals(alias) && !definitionRegistry.isBeanNameInUse(alias)) { definitionRegistry.registerAlias(name, alias); } if (null == type) { if (!bd.isAbstract()) throw new RuntimeException("Concrete bean should has class."); } else nameTypes.put(name, type); } }