// ASM: a very small and fast Java bytecode manipulation framework
// Copyright (c) 2000-2011 INRIA, France Telecom
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holders nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
package org.springframework.asm;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* A parser to make a {@link ClassVisitor} visit a ClassFile structure, as defined in the Java
* Virtual Machine Specification (JVMS). This class parses the ClassFile content and calls the
* appropriate visit methods of a given {@link ClassVisitor} for each field, method and bytecode
* instruction encountered.
*
* @author Eric Bruneton
* @author Eugene Kuleshov
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html">JVMS 4</a>
*/
public class ClassReader
{
/**
* A flag to skip the Code attributes. If this flag is set the Code attributes are neither parsed
* nor visited.
*/
public static final int SKIP_CODE = 1;
/**
* A flag to skip the SourceFile, SourceDebugExtension, LocalVariableTable, LocalVariableTypeTable
* and LineNumberTable attributes. If this flag is set these attributes are neither parsed nor
* visited (i.e. {@link ClassVisitor#visitSource}, {@link MethodVisitor#visitLocalVariable} and
* {@link MethodVisitor#visitLineNumber} are not called).
*/
public static final int SKIP_DEBUG = 2;
/**
* A flag to skip the StackMap and StackMapTable attributes. If this flag is set these attributes
* are neither parsed nor visited (i.e. {@link MethodVisitor#visitFrame} is not called). This flag
* is useful when the {@link ClassWriter#COMPUTE_FRAMES} option is used: it avoids visiting frames
* that will be ignored and recomputed from scratch.
*/
public static final int SKIP_FRAMES = 4;
/**
* A flag to expand the stack map frames. By default stack map frames are visited in their
* original format (i.e. "expanded" for classes whose version is less than V1_6, and "compressed"
* for the other classes). If this flag is set, stack map frames are always visited in expanded
* format (this option adds a decompression/compression step in ClassReader and ClassWriter which
* degrades performance quite a lot).
*/
public static final int EXPAND_FRAMES = 8;
/**
* A flag to expand the ASM specific instructions into an equivalent sequence of standard bytecode
* instructions. When resolving a forward jump it may happen that the signed 2 bytes offset
* reserved for it is not sufficient to store the bytecode offset. In this case the jump
* instruction is replaced with a temporary ASM specific instruction using an unsigned 2 bytes
* offset (see {@link Label#resolve}). This internal flag is used to re-read classes containing
* such instructions, in order to replace them with standard instructions. In addition, when this
* flag is used, goto_w and jsr_w are <i>not</i> converted into goto and jsr, to make sure that
* infinite loops where a goto_w is replaced with a goto in ClassReader and converted back to a
* goto_w in ClassWriter cannot occur.
*/
static final int EXPAND_ASM_INSNS = 256;
/** The size of the temporary byte array used to read class input streams chunk by chunk. */
private static final int INPUT_STREAM_DATA_CHUNK_SIZE = 4096;
/**
* A byte array containing the JVMS ClassFile structure to be parsed. <i>The content of this array
* must not be modified. This field is intended for {@link Attribute} sub classes, and is normally
* not needed by class visitors.</i>
*
* <p>NOTE: the ClassFile structure can start at any offset within this array, i.e. it does not
* necessarily start at offset 0. Use {@link #getItem} and {@link #header} to get correct
* ClassFile element offsets within this byte array.
*/
// DontCheck(MemberName): can't be renamed (for backward binary compatibility).
public final byte[] b;
/** The offset in bytes, in {@link #b}, of the ClassFile's access_flags field. */
public final int header;
/**
* The offset in bytes, in {@link #b}, of each cp_info entry of the ClassFile's constant_pool
* array, <i>plus one</i>. In other words, the offset of constant pool entry i is given by
* cpInfoOffsets[i] - 1, i.e. its cp_info's tag field is given by b[cpInfoOffsets[i] - 1].
*/
private final int[] cpInfoOffsets;
/**
* The String objects corresponding to the CONSTANT_Utf8 constant pool items. This cache avoids
* multiple parsing of a given CONSTANT_Utf8 constant pool item.
*/
private final String[] constantUtf8Values;
/**
* The ConstantDynamic objects corresponding to the CONSTANT_Dynamic constant pool items. This
* cache avoids multiple parsing of a given CONSTANT_Dynamic constant pool item.
*/
private final ConstantDynamic[] constantDynamicValues;
/**
* The start offsets in {@link #b} of each element of the bootstrap_methods array (in the
* BootstrapMethods attribute).
*
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.23">JVMS
* 4.7.23</a>
*/
private final int[] bootstrapMethodOffsets;
/**
* A conservative estimate of the maximum length of the strings contained in the constant pool of
* the class.
*/
private final int maxStringLength;
// -----------------------------------------------------------------------------------------------
// Constructors
// -----------------------------------------------------------------------------------------------
/**
* Constructs a new {@link ClassReader} object.
*
* @param classFile the JVMS ClassFile structure to be read.
*/
public ClassReader(final byte[] classFile)
{
this(classFile, 0, classFile.length);
}
/**
* Constructs a new {@link ClassReader} object.
*
* @param classFileBuffer a byte array containing the JVMS ClassFile structure to be read.
* @param classFileOffset the offset in byteBuffer of the first byte of the ClassFile to be read.
* @param classFileLength the length in bytes of the ClassFile to be read.
*/
public ClassReader(final byte[] classFileBuffer, final int classFileOffset, final int classFileLength)
{ // NOPMD(UnusedFormalParameter) u
没有合适的资源?快使用搜索试试~ 我知道了~
study-springframework-master.zip
共2000个文件
java:4310个
xml:29个
kt:16个
需积分: 0 0 下载量 186 浏览量
2023-06-14
15:14:36
上传
评论
收藏 8.66MB ZIP 举报
温馨提示
study-springframework-master.zip
资源推荐
资源详情
资源评论
收起资源包目录
study-springframework-master.zip (2000个子文件)
overview.html 144B
overview.html 139B
overview.html 138B
overview.html 127B
overview.html 126B
overview.html 112B
overview.html 111B
overview.html 78B
overview.html 75B
ClassReader.java 178KB
AnnotationUtils.java 118KB
MethodWriter.java 116KB
AbstractAutowireCapableBeanFactory.java 92KB
DefaultListableBeanFactory.java 91KB
AnnotatedElementUtils.java 88KB
AbstractBeanFactory.java 82KB
DispatcherServlet.java 72KB
ResolvableType.java 68KB
Frame.java 66KB
HttpHeaders.java 65KB
ClassUtils.java 60KB
AbstractApplicationContext.java 59KB
SymbolTable.java 58KB
Enhancer.java 56KB
FrameworkServlet.java 56KB
AbstractPlatformTransactionManager.java 55KB
BeanDefinitionParserDelegate.java 54KB
StringUtils.java 53KB
JdbcTemplate.java 53KB
JtaTransactionManager.java 50KB
JdbcOperations.java 48KB
DefaultMessageListenerContainer.java 47KB
RequestMappingHandlerAdapter.java 47KB
AbstractNestablePropertyAccessor.java 46KB
HibernateTemplate.java 45KB
ClassWriter.java 45KB
MimeMessageHelper.java 44KB
MBeanExporter.java 43KB
AbstractBeanDefinition.java 43KB
PathMatchingResourcePatternResolver.java 41KB
ConfigurationClassParser.java 41KB
WebMvcConfigurationSupport.java 40KB
JmsTemplate.java 40KB
RouterFunctions.java 39KB
HibernateOperations.java 39KB
RestTemplate.java 38KB
ConstructorResolver.java 38KB
ConcurrentReferenceHashMap.java 38KB
AntPathMatcher.java 38KB
MethodVisitor.java 38KB
MockHttpServletRequest.java 37KB
RequestContext.java 37KB
HibernateTransactionManager.java 36KB
TypeDescriptor.java 36KB
ObjectUtils.java 36KB
ReflectionUtils.java 36KB
Type.java 35KB
CglibAopProxy.java 35KB
Jaxb2Marshaller.java 35KB
AbstractMessageListenerContainer.java 35KB
StompBrokerRelayMessageHandler.java 35KB
MvcUriComponentsBuilder.java 34KB
UriComponentsBuilder.java 34KB
MessageBrokerBeanDefinitionParser.java 34KB
InternalSpelExpressionParser.java 34KB
WebUtils.java 33KB
AnnotationDrivenBeanDefinitionParser.java 33KB
CodeFlow.java 32KB
DataBinder.java 32KB
RequestPredicates.java 32KB
Label.java 32KB
CommonAnnotationBeanPostProcessor.java 32KB
WebTestClient.java 32KB
PersistenceAnnotationBeanPostProcessor.java 31KB
SchedulerFactoryBean.java 31KB
MethodParameter.java 31KB
AbstractHandlerMethodMapping.java 31KB
TransactionAspectSupport.java 31KB
Jackson2ObjectMapperBuilder.java 31KB
HierarchicalUriComponents.java 31KB
BeanUtils.java 30KB
DefaultPersistenceUnitManager.java 30KB
CacheAspectSupport.java 30KB
RestOperations.java 30KB
JpaTransactionManager.java 30KB
DataBufferUtils.java 30KB
Assert.java 30KB
GroovyBeanDefinitionReader.java 29KB
DefaultSingletonBeanRegistry.java 29KB
AutowiredAnnotationBeanPostProcessor.java 29KB
MediaType.java 29KB
GenericConversionService.java 29KB
BeanFactoryUtils.java 28KB
ContextLoader.java 28KB
XStreamMarshaller.java 27KB
AspectJAdviceParameterNameDiscoverer.java 27KB
AsyncRestTemplate.java 26KB
Indexer.java 26KB
ReflectivePropertyAccessor.java 25KB
AbstractAutoProxyCreator.java 25KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
csdn_bibibi
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Picasso_v3.1 2.ipa
- chromedriver-mac-arm64.zip
- 蓝zapro.apk
- chromedriver-linux64.zip
- UCAS研一深度学习实验-MNIST手写数字识别python源码+详细注释(高分项目)
- 基于Python和PyTorch框架完成的一个手写数字识别实验源码(带MINIST手写数字数据集)+详细注释(高分项目)
- 基于Matlab在MNIST数据集上利用CNN完成手写体数字识别任务,并实现单层CNN反向传播算法+源代码+文档说明(高分项目)
- NVIDIA驱动、CUDA和Pytorch及其依赖
- 基于SVM多特征融合的微表情识别python源码+项目说明+详细注释(高分课程设计)
- html动态爱心代码一(附源码)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功