DynamicCallSiteDesc — 동적 호출 사이트 기술자
DynamicCallSiteDesc — 동적 호출 사이트 기술자
DynamicCallSiteDesc는 invokedynamic 호출 사이트(call site)에 대한 명목 기술자입니다. DynamicCallSiteDesc의 구체적인 하위 타입은 불변이어야 하며, 그 동작이 객체 정체성(identity)에 의존해서는 안 됩니다.
본문
public class DynamicCallSiteDesc extends Object
팩토리 메서드
public static DynamicCallSiteDesc of(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType, ConstantDesc... bootstrapArgs)
public static DynamicCallSiteDesc of(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType)
public static DynamicCallSiteDesc of(DirectMethodHandleDesc bootstrapMethod, MethodTypeDesc invocationType)
- 부트스트랩 메서드, 호출 이름, 호출 타입, 부트스트랩 인자를 지정해 기술자를 생성합니다.
주요 메서드
public DynamicCallSiteDesc withArgs(ConstantDesc... bootstrapArgs)
public DynamicCallSiteDesc withNameAndType(String invocationName, MethodTypeDesc invocationType)
public String invocationName()
public MethodTypeDesc invocationType()
public MethodHandleDesc bootstrapMethod()
public ConstantDesc[] bootstrapArgs()
public CallSite resolveCallSiteDesc(MethodHandles.Lookup lookup) throws Throwable
invocationName()과invocationType()는 호출 사이트의 이름과 타입을 반환합니다.bootstrapMethod()와bootstrapArgs()는 부트스트랩 메서드와 그 인자를 반환합니다.resolveCallSiteDesc는 이 기술자를 실제CallSite로 해석합니다.