使用plantUML绘制类图 --- spring的源码研究一

spring的源码研究一

spring的源码研究一

@startuml
note top of SpringApplicationBuilder
  
end note
class SpringApplicationBuilder{
	- SpringApplication application
	+ SpringApplicationBuilder(Class<?>... sources)
	# SpringApplication createSpringApplication(Class<?>... sources)
}

SpringApplicationBuilder +-- SpringApplication

note top of SpringApplication
  1.
end note
class SpringApplication{
	+ SpringApplication(Class<?>... primarySources)
	+ SpringApplication(ResourceLoader resourceLoader, Class<?>... primarySources)
	+ ConfigurableApplicationContext run(String... args)
	+ ClassLoader getClassLoader()
	- <T> Collection<T> getSpringFactoriesInstances(Class<T> type)
	- <T> Collection<T> getSpringFactoriesInstances(Class<T> type, Class<?>[] parameterTypes, Object... args)
	- <T> List<T> createSpringFactoriesInstances(Class<T> type, Class<?>[] parameterTypes, ClassLoader classLoader, Object[] args, Set<String> names)
	- SpringApplicationRunListeners getRunListeners(String[] args)
}

SpringApplication +-- ClassUtils
note top of ClassUtils
  
end note 
abstract class ClassUtils{
	+ Class<?> forName(String name, @Nullable ClassLoader classLoader)
}
ClassUtils +-- Class
note top of Class
  核心方法: 
  1:forName(?) || forName(?,?,?) ===> forName0(?,?,?,?)
  2:getDeclaredConstructor(?):
  3:native registerNatives()方法 可以从本地加载方法的执行
end note 
class Class implements Serializable,GenericDeclaration,Type,AnnotatedElement{
	+ Class<?> forName(String className)
	+ Class<?> forName(String name, boolean initialize, ClassLoader loader)
	+ Constructor<T> getDeclaredConstructor(Class<?>... parameterTypes)
	- Constructor<T> getConstructor0(Class<?>[] parameterTypes, int which)
	- native Class<?> forName0(String name, boolean initialize,ClassLoader loader, Class<?> caller)
	- native void registerNatives()
}
interface Serializable{}
interface GenericDeclaration extends AnnotatedElement{} 
interface Type{}
interface AnnotatedElement{}


note top of BeanUtils
  
end note 
abstract class BeanUtils{
	+ <T> T instantiateClass(Constructor<T> ctor, Object... args)
}


SpringApplication +-- SpringApplicationRunListeners
note top of SpringApplicationRunListeners
  
end note 
class SpringApplicationRunListeners{
 	- List<SpringApplicationRunListener> listeners
 	# SpringApplicationRunListeners(Log log, Collection<? extends SpringApplicationRunListener> listeners)
 	+ void starting()
 	+ void started(ConfigurableApplicationContext context)
 	+ void running(ConfigurableApplicationContext context)

}

SpringApplicationRunListeners +-- SpringApplicationRunListener
interface SpringApplicationRunListener{
	# void starting()
}
@enduml
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值