/** * Creates an instance of {@link AbstractInternalContext}. The internal context is meant to * hold the configuration and state informations, but not necessarily retrieving * those values... */ public AbstractInternalContext() { _configuration = XMLConfiguration.newInstance(); _javaNaming = new JavaNamingImpl(); }
public AbstractInternalContext() { _properties = XMLProperties.newInstance(); // TODO[WG]: remove once injection works _javaNaming = new JavaNamingImpl(this); }
/** * Generates the name of an add method for the given field name. * * @param fieldName the field name to generate a method name for * @return the generated add method name */ @Override public final String getAddMethodNameForField(final String fieldName) { return METHOD_PREFIX_ADD + toJavaClassName(fieldName); }
/** * {@inheritDoc} The InternalContext itself is not stored! But all values of interest are read and * stored in local attributes. */ public void setInternalContext(final InternalContext internalContext) { _mappingLoader = internalContext.getMappingLoader(); _classLoader = internalContext.getClassLoader(); _useIntrospector = internalContext.getUseIntrospector(); _loadPackageMappings = internalContext.getLoadPackageMapping(); _introspector = internalContext.getIntrospector(); _resolverStrategy = internalContext.getResolverStrategy(); }
/** * Creates a new XMLInstance2Schema * */ public XMLInstance2Schema() { super(); _internalContext = new BackwardCompatibilityContext(); }
/** * To get the {@link JavaNaming} instance to be used. * * @return the JavaNaming to be used */ public JavaNaming getJavaNaming() { return _internalContext.getJavaNaming(); }
/** * Creates an instance of {@link SchemaContextImpl}. */ public SchemaContextImpl() { super(); _properties = XMLProperties.newInstance(); }
/** * To get the value of a specific property. * * @param propertyName name of the Property * @return the value (Object) of the property */ public Object getProperty(final String propertyName) { return _internalContext.getProperty(propertyName); }
/** * @see org.castor.xml.InternalContext#getParser() */ public Parser getParser() { return getParser(null); }
/** * Sets a custom value of a given Castor XML-specific property. * * @param name * Name of the Castor XML property * @param value * Custom value to set. * @since 1.1.2 */ public void setProperty(final String name, final String value) { _internalContext.setProperty(name, value); }
/** * @see org.castor.xml.InternalContext#getXMLNaming() */ public XMLNaming getXMLNaming() { return getXMLNaming(null); }
/** * Construct properties with given parent. Application and domain class loaders will be * initialized to the ones of the parent. <br/> * Note: This constructor is not intended for public use. Use one of the newInstance() methods * instead. * * @param parent Parent properties. */ public XMLProperties(final AbstractProperties parent) { super(parent); loadDefaultProperties(FILEPATH, FILENAME); }
/** * @see org.castor.xml.UnmarshalListener.initialized * @param object * @param parentObject */ public void initialized(Object stateObject, Object parentObject) { if (_unmarshalListener != null) _unmarshalListener.initialized(stateObject, parentObject); }
/** * Generates the name of an add method for the given field name. * * @param fieldName the field name to generate a method name for * @return the generated add method name */ @Override public final String getAddMethodNameForField(final String fieldName) { return METHOD_PREFIX_ADD + toJavaClassName(fieldName); }
/** * Creates a new Unmarshaller with the given Object. * * @param root the instance to unmarshal into. This * may be null, if the Unmarshaller#setMapping is called * to load a mapping for the root element of xml document. */ public Unmarshaller(final Object root) { this(new BackwardCompatibilityContext(), root); }
/** * Generates the name of a get method for the given field name. * * @param fieldName the field name to generate a method name for * @return the generated get method name */ @Override public final String getGetMethodNameForField(final String fieldName) { return METHOD_PREFIX_GET + toJavaClassName(fieldName); }
/** * Generates the name of a set method for the given field name. * * @param fieldName the field name to generate a method name for * @return the generated set method name */ @Override public final String getCreateMethodNameForField(final String fieldName) { return METHOD_PREFIX_CREATE + toJavaClassName(fieldName); }
/** * Generates the name of an is method for the given field name. * * @param fieldName the field name to generate a method name for * @return the generated is method name */ @Override public final String getIsMethodNameForField(final String fieldName) { return METHOD_PREFIX_IS + toJavaClassName(fieldName); }
/** * Generates the name of an add method for the given field name. * @param fieldName the field name to generate a method name for * @return the generated add method name */ public final String getAddMethodNameForField(final String fieldName) { return METHOD_PREFIX_ADD + toJavaClassName(fieldName); }
/** * Generates the name of a create method for the given field name. * @param fieldName the field name to generate a method name for * @return the generated create method name */ public final String getSetMethodNameForField(final String fieldName) { return METHOD_PREFIX_SET + toJavaClassName(fieldName); }