spring源码分析之spring-core总结篇

本文主要分析spring-core模块,包括asm、cglib的概述及应用,探讨core、lang包中的内容,特别是Objenesis工具的使用场景。此外,还介绍了Class对象在Java中的重要性及其相关方法。
摘要由CSDN通过智能技术生成

1.spring-core概览

spring-core是spring框架的基石,它为spring框架提供了基础的支持。

spring-core从源码上看,分为6个package,分别是asm,cglib,core,lang,objenesis和util。

1.1 asm

关于asm的内幕参见博客:

spring源码分析之spring-core asm概述

1.2 cglib

关于cglib的内幕参见博客

cglib源码分析--转

1.3 core

 

 

1.4 lang

四个注解接口

/**
 * Indicates that the annotated element uses the Http Server available in
 * {
    @code com.sun.*} classes, which is only available on a Sun/Oracle JVM.
 *
 * @author Stephane Nicoll
 * @since 4.1
 */
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
@Documented
public @interface UsesSunHttpServer {
}

 

/**
 * Indicates that the annotated element uses Java 7 specific API constructs,
 * without implying that it strictly requires Java 7.
 *
 * @author Stephane Nicoll
 * @since 4.1
 */
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
@Documented
@Deprecated
public @interface UsesJava7 {
}

 

/**
 * Indicates that the annotated element uses Java 8 specific API constructs,
 * without implying that it strictly requires Java 8.
 *
 * @author Stephane Nicoll
 * @since 4.1
 */
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
@Documented
@Deprecated
public @
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值