Class ExtensionTemplate

java.lang.Object
spoon.template.AbstractTemplate<CtType<?>>
spoon.template.ExtensionTemplate
All Implemented Interfaces:
Template<CtType<?>>

public class ExtensionTemplate extends AbstractTemplate<CtType<?>>
Inserts all the methods, fields, constructors, initialization blocks (if target is a class), inner types, and super interfaces (except Template) from a given template by substituting all the template parameters by their values. Members annotated with Local or Parameter are not inserted.
  • Constructor Details

    • ExtensionTemplate

      public ExtensionTemplate()
  • Method Details

    • apply

      public CtType<?> apply(CtType<?> target)
      Description copied from interface: Template
      Returns the code which results from applying the template.
      Parameters:
      target - the type that defines the context of the substitution. It may be null for templates with no context.