Package net.sf.saxon.expr
Class Component
java.lang.Object
net.sf.saxon.expr.Component
- Direct Known Subclasses:
- Component.M
Represents a component as defined in the XSLT 3.0 specification: for example a function, a named template,
 an attribute set, a global variable.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidexport(ExpressionPresenter out, Map<Component, Integer> componentIdMap, Map<StylesheetPackage, Integer> packageIdMap) getActor()Get the actor (for example a compiled template, function, or variable) that is executed when this component is calledGet the component from which this one is derivedGet the component's binding vector; that is the list of external references to other componentsintGet the containing package of this componentGet the declaring package of this componentGet the visibility of the componentDetermine whether the visibility of the component is due to an explicit visibility attribute on the component declarationbooleanAsk whether this is a hidden component derived from an abstract component with no implementationlistComponentReferences(Map<Component, Integer> componentIdMap) static ComponentmakeComponent(Actor actor, Visibility visibility, VisibilityProvenance provenance, StylesheetPackage containingPackage, StylesheetPackage declaringPackage) Create a componentvoidsetBaseComponent(Component original) Set the component from which this one is derivedvoidsetComponentBindings(List<ComponentBinding> bindings) Set the component's binding vector; that is the list of external references to other componentsvoidsetVisibility(Visibility visibility, VisibilityProvenance provenance) Set the visibility of the component, and say whether it is explicit or defaulted
- 
Field Details- 
actor
 
- 
- 
Method Details- 
makeComponentpublic static Component makeComponent(Actor actor, Visibility visibility, VisibilityProvenance provenance, StylesheetPackage containingPackage, StylesheetPackage declaringPackage) Create a component- Parameters:
- actor- the compiled code that implements the component, for example a Template or Function
- visibility- the visibility of the component
- provenance- where the visibility property came from
- containingPackage- the package to which this component belongs
- declaringPackage- the package in which the original declaration of the component appears
- Returns:
- the constructed component
 
- 
getComponentBindingsGet the component's binding vector; that is the list of external references to other components- Returns:
- the binding vector, a list of component bindings. These are identified by a binding slot number held with the individual instruction (such as a call-template instruction or a global variable reference) that contains the external component reference.
 
- 
setComponentBindingsSet the component's binding vector; that is the list of external references to other components- Parameters:
- bindings- the binding vector, a list of component bindings. These are identified by a binding slot number held with the individual instruction (such as a call-template instruction or a global variable reference) that contains the external component reference.
 
- 
setVisibilitySet the visibility of the component, and say whether it is explicit or defaulted- Parameters:
- visibility- the visibility of the component
- provenance- where the visibility property came from
 
- 
getVisibilityGet the visibility of the component- Returns:
- the component's visibility. In the declaring package this will be the original declared or exposed visibility; in a using package, it will be the visibility of the component within that package.
 
- 
getVisibilityProvenanceDetermine whether the visibility of the component is due to an explicit visibility attribute on the component declaration- Returns:
- the origin of the visibility information
 
- 
isHiddenAbstractComponentpublic boolean isHiddenAbstractComponent()Ask whether this is a hidden component derived from an abstract component with no implementation- Returns:
- true if this component is hidden, and its base component is abstract
 
- 
getActorGet the actor (for example a compiled template, function, or variable) that is executed when this component is called- Returns:
- the code forming the implementation of this component
 
- 
getDeclaringPackageGet the declaring package of this component- Returns:
- the package in which the code of the component was originally declared
 
- 
getContainingPackageGet the containing package of this component- Returns:
- the package that contains this (version of the) component
 
- 
getBaseComponentGet the component from which this one is derived- Returns:
- the component from which this one is derived. This is set when the component appears in the package as a result of xsl:use-package; a component C in the used package is modified to create a component D in the using package, and D.getBaseComponent() returns C. The value will be null in the case of a component whose declaring package is the same as its containing package, that is, an "original" component (including an overriding component)
 
- 
setBaseComponentSet the component from which this one is derived- Parameters:
- original- the component from which this one is derived. This is set when the component appears in the package as a result of xsl:use-package; a component C in the used package is modified to create a component D in the using package, and D.getBaseComponent() returns C. The value will be null in the case of a component whose declaring package is the same as its containing package, that is, an "original" component (including an overriding component)
 
- 
exportpublic void export(ExpressionPresenter out, Map<Component, Integer> componentIdMap, Map<StylesheetPackage, throws XPathExceptionInteger> packageIdMap) - Throws:
- XPathException
 
- 
listComponentReferences
- 
getComponentKindpublic int getComponentKind()
 
-