Package org.immutables.generator
Class Templates.Fragment
java.lang.Object
org.immutables.generator.Templates.Fragment
- All Implemented Interfaces:
Templates.Invokable
- Direct Known Subclasses:
Generator_Asts.FragmentDispatch,Generator_Criteria.FragmentDispatch,Generator_CriteriaRepository.FragmentDispatch,Generator_Datatypes.FragmentDispatch,Generator_Doer.FragmentDispatch,Generator_Encodings.FragmentDispatch,Generator_ForComprehencer.FragmentDispatch,Generator_Funcs.FragmentDispatch,Generator_Genie.FragmentDispatch,Generator_Gsons.FragmentDispatch,Generator_Immutables.FragmentDispatch,Generator_Metaservices.FragmentDispatch,Generator_Mirrors.FragmentDispatch,Generator_Modifiables.FragmentDispatch,Generator_Parcelables.FragmentDispatch,Generator_Renderers.FragmentDispatch,Generator_Repositories.FragmentDispatch,Generator_Transformers.FragmentDispatch,Generator_Visitors.FragmentDispatch,Generator_Whitespacer.FragmentDispatch,Output.OutputFilter
- Enclosing class:
Templates
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintarity()invoke(Templates.Invokation invokation, Object... params) abstract voidrun(Templates.Invokation invokation) (package private) CharSequencetoString()Ability to pass captured fragment and evaluate it as a string.
-
Field Details
-
arity
private final int arity -
cachedToString
-
-
Constructor Details
-
Fragment
protected Fragment(int arity) - Parameters:
arity- number of fragment parameters
-
-
Method Details
-
arity
public int arity() -
run
-
invoke
- Specified by:
invokein interfaceTemplates.Invokable
-
toCharSequence
CharSequence toCharSequence() -
toString
Ability to pass captured fragment and evaluate it as a string. For non-captured fragments or fragments which expects parameters, plaintoStringreturned.
-