Java Code Examples for net.bytebuddy.description.method.ParameterDescription#Token
The following examples show how to use
net.bytebuddy.description.method.ParameterDescription#Token .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ByteBuddy.java From byte-buddy with Apache License 2.0 | 6 votes |
/** * {@inheritDoc} */ public List<MethodDescription.Token> extractConstructors(TypeDescription instrumentedType) { List<ParameterDescription.Token> tokens = new ArrayList<ParameterDescription.Token>(instrumentedType.getRecordComponents().size()); for (RecordComponentDescription.InDefinedShape recordComponent : instrumentedType.getRecordComponents()) { tokens.add(new ParameterDescription.Token(recordComponent.getType(), recordComponent.getDeclaredAnnotations().filter(targetsElement(ElementType.CONSTRUCTOR)))); } return Collections.singletonList(new MethodDescription.Token(MethodDescription.CONSTRUCTOR_INTERNAL_NAME, Opcodes.ACC_PUBLIC, Collections.<TypeVariableToken>emptyList(), TypeDescription.Generic.VOID, tokens, Collections.<TypeDescription.Generic>emptyList(), Collections.<AnnotationDescription>emptyList(), AnnotationValue.UNDEFINED, TypeDescription.Generic.UNDEFINED)); }
Example 2
Source File: Transformer.java From byte-buddy with Apache License 2.0 | 2 votes |
/** * Creates a transformed parameter. * * @param index The index of the transformed method. * @param parameterToken The token representing the transformed method parameter's properties. */ protected TransformedParameter(int index, ParameterDescription.Token parameterToken) { this.index = index; this.parameterToken = parameterToken; }