public class DefaultIntrospectionContext extends java.lang.Object implements IntrospectionContext
| Constructor and Description |
|---|
DefaultIntrospectionContext()
Constructor.
|
DefaultIntrospectionContext(IntrospectionContext parentContext)
Initializes from a parent context.
|
DefaultIntrospectionContext(IntrospectionContext parentContext,
java.lang.String targetNamespace)
Initializes from a parent context, overriding the target namespace.
|
DefaultIntrospectionContext(java.net.URI contributionUri,
java.lang.ClassLoader classLoader)
Constructor.
|
DefaultIntrospectionContext(java.net.URI contributionUri,
java.lang.ClassLoader classLoader,
java.net.URL sourceBase)
Constructor.
|
DefaultIntrospectionContext(java.net.URI contributionUri,
java.lang.ClassLoader classLoader,
java.net.URL sourceBase,
java.lang.String targetNamespace)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addError(org.fabric3.api.host.failure.ValidationFailure e)
Add a fatal error to the validation results.
|
void |
addErrors(java.util.List<org.fabric3.api.host.failure.ValidationFailure> errors)
Add a collection of fatal errors to the validation results.
|
void |
addTypeMapping(java.lang.Class<?> type,
TypeMapping typeMapping)
Adds a mapping from formal parameter types to actual types for a class to the cache.
|
void |
addWarning(org.fabric3.api.host.failure.ValidationFailure e)
Add a non-fatal warning to the validation results.
|
void |
addWarnings(java.util.List<org.fabric3.api.host.failure.ValidationFailure> warnings)
Add a collection of non-fatal warnings to the validation results.
|
java.lang.ClassLoader |
getClassLoader()
Returns the classloader of the contribution being installed.
|
java.net.URI |
getContributionUri()
Returns the active contribution URI.
|
java.util.List<org.fabric3.api.host.failure.ValidationFailure> |
getErrors()
Returns the list of fatal errors detected during validation.
|
java.net.URL |
getSourceBase()
Returns the location of the XML artifact being introspected.
|
java.lang.String |
getTargetNamespace()
Target namespace for this loader context.
|
TypeMapping |
getTypeMapping(java.lang.Class<?> type)
Used for introspecting Java generics.
|
java.util.Map<java.lang.Class<?>,TypeMapping> |
getTypeMappings()
Used for introspecting Java generics.
|
java.util.List<org.fabric3.api.host.failure.ValidationFailure> |
getWarnings()
Returns the list of non-fatal warnings detected during validation.
|
boolean |
hasErrors()
Returns true if the validation has detected any fatal errors.
|
boolean |
hasWarnings()
Returns true if the validation has detected any non-fatal warnings.
|
void |
setTargetNamespace(java.lang.String targetNamespace)
Sets the current target namespace
|
public DefaultIntrospectionContext()
public DefaultIntrospectionContext(java.net.URI contributionUri,
java.lang.ClassLoader classLoader,
java.net.URL sourceBase,
java.lang.String targetNamespace)
contributionUri - the active contribution URIclassLoader - the classloader for loading application resourcessourceBase - the composite locationtargetNamespace - the target namespace.public DefaultIntrospectionContext(java.net.URI contributionUri,
java.lang.ClassLoader classLoader)
contributionUri - the active contribution URIclassLoader - the classloader for loading application resourcespublic DefaultIntrospectionContext(java.net.URI contributionUri,
java.lang.ClassLoader classLoader,
java.net.URL sourceBase)
contributionUri - the active contribution URIclassLoader - the classloader for loading application resourcessourceBase - the composite locationpublic DefaultIntrospectionContext(IntrospectionContext parentContext, java.lang.String targetNamespace)
parentContext - the parent context.targetNamespace - the target namespace.public DefaultIntrospectionContext(IntrospectionContext parentContext)
parentContext - Parent context.public boolean hasErrors()
IntrospectionContexthasErrors in interface IntrospectionContextpublic java.util.List<org.fabric3.api.host.failure.ValidationFailure> getErrors()
IntrospectionContextgetErrors in interface IntrospectionContextpublic void addError(org.fabric3.api.host.failure.ValidationFailure e)
IntrospectionContextaddError in interface IntrospectionContexte - the fatal error that has been foundpublic void addErrors(java.util.List<org.fabric3.api.host.failure.ValidationFailure> errors)
IntrospectionContextaddErrors in interface IntrospectionContexterrors - the fatal errors that have been foundpublic boolean hasWarnings()
IntrospectionContexthasWarnings in interface IntrospectionContextpublic java.util.List<org.fabric3.api.host.failure.ValidationFailure> getWarnings()
IntrospectionContextgetWarnings in interface IntrospectionContextpublic void addWarning(org.fabric3.api.host.failure.ValidationFailure e)
IntrospectionContextaddWarning in interface IntrospectionContexte - the non-fatal warning that has been foundpublic void addWarnings(java.util.List<org.fabric3.api.host.failure.ValidationFailure> warnings)
IntrospectionContextaddWarnings in interface IntrospectionContextwarnings - the non-fatal warnings that have been foundpublic java.lang.ClassLoader getClassLoader()
IntrospectionContextgetClassLoader in interface IntrospectionContextpublic java.net.URL getSourceBase()
IntrospectionContextgetSourceBase in interface IntrospectionContextpublic java.lang.String getTargetNamespace()
IntrospectionContextgetTargetNamespace in interface IntrospectionContextpublic void setTargetNamespace(java.lang.String targetNamespace)
IntrospectionContextsetTargetNamespace in interface IntrospectionContexttargetNamespace - the namespace to setpublic java.net.URI getContributionUri()
IntrospectionContextgetContributionUri in interface IntrospectionContextpublic TypeMapping getTypeMapping(java.lang.Class<?> type)
IntrospectionContextgetTypeMapping in interface IntrospectionContexttype - the classpublic void addTypeMapping(java.lang.Class<?> type,
TypeMapping typeMapping)
IntrospectionContextaddTypeMapping in interface IntrospectionContexttype - the classtypeMapping - the mappingspublic java.util.Map<java.lang.Class<?>,TypeMapping> getTypeMappings()
IntrospectionContextgetTypeMappings in interface IntrospectionContext