byte-buddy-1.8.21.jar
登录
|
net.bytebuddy:byte-buddy:1.8.21
META-INF
net
bytebuddy
pool
package-info.java
asm
matcher
implementation
auxiliary
package-info.java
bytecode
Multiplication.java
package-info.java
StackSize.java
Duplication.java
constant
ByteCodeAppender.java
Removal.java
Throw.java
TypeCreation.java
collection
Addition.java
member
StackManipulation.java
assign
Implementation.java
InvokeDynamic.java
LoadedTypeInitializer.java
MethodDelegation.java
DefaultMethodCall.java
bind
FixedValue.java
StubMethod.java
InvocationHandlerAdapter.java
MethodAccessorFactory.java
attribute
FieldAccessor.java
MethodCall.java
ExceptionMethod.java
EqualsMethod.java
HashCodeMethod.java
ToStringMethod.java
SuperMethodCall.java
utility
dynamic
ByteBuddy.java
build
NamingStrategy.java
ClassFileVersion.java
TypeCache.java
description
agent
jar
TypeCreation.java
清空
类结构
package net.bytebuddy.implementation.bytecode; import net.bytebuddy.build.
HashCodeAndEqualsPlugin
; import net.bytebuddy.description.type.
TypeDescription
; import net.bytebuddy.implementation.
Implementation
; import net.bytebuddy.jar.asm.
MethodVisitor
; import net.bytebuddy.jar.asm.
Opcodes
; /** * A stack manipulation for creating an <i>undefined</i> type on which a constructor is to be called. */ @
HashCodeAndEqualsPlugin
.
Enhance
public class
TypeCreation
implements
StackManipulation
{ /** * The type that is being created. */ private final
TypeDescription
typeDescription
; /** * Constructs a new type creation. * * @param typeDescription The type to be create. */ protected
TypeCreation
(
TypeDescription
typeDescription
) { this.
typeDescription
=
typeDescription
; } /** * Creates a type creation for the given type. * * @param typeDescription The type to be create. * @return A stack manipulation that represents the creation of the given type. */ public static
StackManipulation
of
(
TypeDescription
typeDescription
) { if (
typeDescription
.
isArray
() ||
typeDescription
.
isPrimitive
() ||
typeDescription
.
isAbstract
()) { throw new
IllegalArgumentException
(
typeDescription
+ " is not instantiable"); } return new
TypeCreation
(
typeDescription
); } @
Override
public boolean
isValid
() { return true; } @
Override
public
Size
apply
(
MethodVisitor
methodVisitor
,
Implementation
.
Context
implementationContext
) {
methodVisitor
.
visitTypeInsn
(
Opcodes
.
NEW
,
typeDescription
.
getInternalName
()); return new
Size
(1, 1); } }
查找资源
Jre/Lib
输入类名或文件名
类结构窗口