public class Component<T extends ComponentCode> extends Object
Constructor and Description |
---|
Component(T code,
Visibility visibility,
StylesheetPackage containingPackage,
StylesheetPackage declaringPackage)
Create a component
|
Modifier and Type | Method and Description |
---|---|
void |
export(ExpressionPresenter out,
Map<Component,Integer> componentIdMap) |
Component<? extends T> |
getBaseComponent()
Get the component from which this one is derived
|
T |
getCode()
Get the code (for example a compiled template, function, or variable) that is executed
when this component is called
|
List<ComponentBinding> |
getComponentBindings()
Get the component's binding vector; that is the list of external references to other components
|
StylesheetPackage |
getContainingPackage()
Get the containing package of this component
|
StylesheetPackage |
getDeclaringPackage()
Get the declaring package of this component
|
Visibility |
getVisibility()
Get the visibility of the component
|
boolean |
isVisibilityExplicit()
Ask whether the visibility of the component is due to an explicit visibility attribute on the component
declaration
|
String |
listComponentReferences(Map<Component,Integer> componentIdMap) |
void |
setBaseComponent(Component<? extends T> original)
Set the component from which this one is derived
|
void |
setComponentBindings(List<ComponentBinding> bindings)
Set the component's binding vector; that is the list of external references to other components
|
void |
setVisibility(Visibility visibility,
boolean explicit)
Set the visibility of the component, and say whether it is explicit or defaulted
|
public Component(T code, Visibility visibility, StylesheetPackage containingPackage, StylesheetPackage declaringPackage)
code
- the compiled code that implements the component, for example a Template or Functionvisibility
- the visibility of the componentcontainingPackage
- the package to which this component belongsdeclaringPackage
- the package in which the original declaration of the component appearspublic List<ComponentBinding> getComponentBindings()
public void setComponentBindings(List<ComponentBinding> bindings)
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.public void setVisibility(Visibility visibility, boolean explicit)
visibility
- the visibility of the componentexplicit
- set to true if the visibility is an explicit attribute on the component declarationpublic Visibility getVisibility()
public boolean isVisibilityExplicit()
public T getCode()
public StylesheetPackage getDeclaringPackage()
public StylesheetPackage getContainingPackage()
public Component<? extends T> getBaseComponent()
public void setBaseComponent(Component<? extends T> original)
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)public void export(ExpressionPresenter out, Map<Component,Integer> componentIdMap) throws XPathException
XPathException
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.