signature:
public class WildFlyJobXmlResolver { /** * Creates the { @ linkplain JobXmlResolver resolver } for the deployment inheriting any visible resolvers and job XML
 * files from dependencies .
 * @ param deploymentUnit the deployment to process
 * @ return the resolve
 * @ throws DeploymentUnitProcessingException if an error occurs processing the deployment */
public static WildFlyJobXmlResolver forDeployment ( final DeploymentUnit deploymentUnit ) throws DeploymentUnitProcessingException { } }

implementation:
// If this deployment unit already has a resolver , just use it
if ( deploymentUnit . hasAttachment ( BatchAttachments . JOB_XML_RESOLVER ) ) { return deploymentUnit . getAttachment ( BatchAttachments . JOB_XML_RESOLVER ) ; } // Get the module for it ' s class loader
final Module module = deploymentUnit . getAttachment ( Attachments . MODULE ) ; final ClassLoader classLoader = module . getClassLoader ( ) ; WildFlyJobXmlResolver resolver ; // If we ' re an EAR we need to skip sub - deployments as they ' ll be process later , however all sub - deployments have
// access to the EAR / lib directory so those resources need to be processed
if ( DeploymentTypeMarker . isType ( DeploymentType . EAR , deploymentUnit ) ) { // Create a new WildFlyJobXmlResolver without jobs from sub - deployments as they ' ll be processed later
final List < ResourceRoot > resources = new ArrayList < > ( ) ; for ( ResourceRoot r : deploymentUnit . getAttachmentList ( Attachments . RESOURCE_ROOTS ) ) { if ( ! SubDeploymentMarker . isSubDeployment ( r ) ) { resources . add ( r ) ; } } resolver = create ( classLoader , resources ) ; deploymentUnit . putAttachment ( BatchAttachments . JOB_XML_RESOLVER , resolver ) ; } else { // Create a new resolver for this deployment
if ( deploymentUnit . hasAttachment ( Attachments . RESOURCE_ROOTS ) ) { resolver = create ( classLoader , deploymentUnit . getAttachmentList ( Attachments . RESOURCE_ROOTS ) ) ; } else { resolver = create ( classLoader , Collections . singletonList ( deploymentUnit . getAttachment ( Attachments . DEPLOYMENT_ROOT ) ) ) ; } deploymentUnit . putAttachment ( BatchAttachments . JOB_XML_RESOLVER , resolver ) ; // Process all accessible sub - deployments
final List < DeploymentUnit > accessibleDeployments = deploymentUnit . getAttachmentList ( Attachments . ACCESSIBLE_SUB_DEPLOYMENTS ) ; for ( DeploymentUnit subDeployment : accessibleDeployments ) { // Skip our self
if ( deploymentUnit . equals ( subDeployment ) ) { continue ; } if ( subDeployment . hasAttachment ( BatchAttachments . JOB_XML_RESOLVER ) ) { final WildFlyJobXmlResolver toCopy = subDeployment . getAttachment ( BatchAttachments . JOB_XML_RESOLVER ) ; WildFlyJobXmlResolver . merge ( resolver , toCopy ) ; } else { // We need to create a resolver for the sub - deployment and merge the two
final WildFlyJobXmlResolver toCopy = forDeployment ( subDeployment ) ; subDeployment . putAttachment ( BatchAttachments . JOB_XML_RESOLVER , toCopy ) ; WildFlyJobXmlResolver . merge ( resolver , toCopy ) ; } } } return resolver ;


signature:
public class WildFlyJobXmlResolver { /** * Returns the job XML file names which contain the job name .
 * @ param jobName the job name to find the job XML files for
 * @ return the set of job XML files the job can be run from */
Set < String > getJobXmlNames ( final String jobName ) { } }

implementation: if ( jobNames . containsKey ( jobName ) ) { return Collections . unmodifiableSet ( jobNames . get ( jobName ) ) ; } return Collections . emptySet ( ) ;


signature:
public class WildFlyJobXmlResolver { /** * Initializes the state of an instance */
private void init ( final ClassLoader classLoader ) { } }

implementation:
// Load the user defined resolvers
for ( JobXmlResolver resolver : ServiceLoader . load ( JobXmlResolver . class , classLoader ) ) { jobXmlResolvers . add ( resolver ) ; for ( String jobXml : resolver . getJobXmlNames ( classLoader ) ) { addJob ( jobXml , resolver . resolveJobName ( jobXml , classLoader ) ) ; } } // Load the default names
for ( Map . Entry < String , VirtualFile > entry : jobXmlFiles . entrySet ( ) ) { try { // Parsing the entire job XML seems excessive to just get the job name . There are two reasons for this :
// 1 ) If an error occurs during parsing there ' s no real need to consider this a valid job
// 2 ) Using the implementation parser seems less error prone for future - proofing
final Job job = JobParser . parseJob ( entry . getValue ( ) . openStream ( ) , classLoader , new XMLResolver ( ) { // this is essentially what JBeret does , but it ' s ugly . JBeret might need an API to handle this
@ Override public Object resolveEntity ( final String publicID , final String systemID , final String baseURI , final String namespace ) throws XMLStreamException { try { return ( jobXmlFiles . containsKey ( systemID ) ? jobXmlFiles . get ( systemID ) . openStream ( ) : null ) ; } catch ( IOException e ) { throw new XMLStreamException ( e ) ; } } } ) ; addJob ( entry . getKey ( ) , job . getId ( ) ) ; } catch ( XMLStreamException | IOException e ) { // Report the possible error as we don ' t want to fail the deployment . The job may never be run .
BatchLogger . LOGGER . invalidJobXmlFile ( entry . getKey ( ) ) ; } }


signature:
public class JbossAuthorizationManager { /** * Get the canonical request URI from the request mapping data requestPath
 * @ param request
 * @ return the request URI path */
protected String requestURI ( HttpServerExchange request ) { } }

implementation: String uri = request . getRelativePath ( ) ; if ( uri == null || uri . equals ( "/" ) ) { uri = "" ; } return uri ;


signature:
public class CNCtx { /** * This method is used by the iiop and iiopname URL Context factories . */
public static ResolveResult createUsingURL ( String url , Hashtable env ) throws NamingException { } }

implementation:
CNCtx ctx = new CNCtx ( ) ; if ( env != null ) { env = ( Hashtable ) env . clone ( ) ; } ctx . _env = env ; String rest = ctx . initUsingUrl ( env != null ? ( org . omg . CORBA . ORB ) env . get ( "java.naming.corba.orb" ) : null , url , env ) ; // rest is the INS name
// Return the parsed form to prevent subsequent lookup
// from parsing the string as a composite name
// The caller should be aware that a toString ( ) of the name
// will yield its INS syntax , rather than a composite syntax
return new ResolveResult ( ctx , parser . parse ( rest ) ) ;


signature:
public class CNCtx { /** * Initializes the COS Naming Service .
 * This method initializes the three instance fields :
 * _ nc : The root naming context .
 * _ orb : The ORB to use for connecting RMI / IIOP stubs and for
 * getting the naming context ( _ nc ) if one was not specified
 * explicitly via PROVIDER _ URL .
 * _ name : The name of the root naming context .
 * _ orb is obtained from java . naming . corba . orb if it has been set .
 * Otherwise , _ orb is created using the host / port from PROVIDER _ URL
 * ( if it contains an " iiop " or " iiopname " URL ) , or from initialization
 * properties specified in env .
 * _ nc is obtained from the IOR stored in PROVIDER _ URL if it has been
 * set and does not contain an " iiop " or " iiopname " URL . It can be
 * a stringified IOR , " corbaloc " URL , " corbaname " URL ,
 * or a URL ( such as file / http / ftp ) to a location
 * containing a stringified IOR . If PROVIDER _ URL has not been
 * set in this way , it is obtained from the result of
 * ORB . resolve _ initial _ reference ( " NameService " ) ;
 * _ name is obtained from the " iiop " , " iiopname " , or " corbaname " URL .
 * It is the empty name by default .
 * @ param env Environment The possibly null environment .
 * @ throws NamingException When an error occurs while initializing the
 * ORB or the naming context . */
private void initOrbAndRootContext ( Hashtable env ) throws NamingException { } }

implementation:
org . omg . CORBA . ORB inOrb = null ; String ncIor = null ; if ( env != null ) { inOrb = ( org . omg . CORBA . ORB ) env . get ( "java.naming.corba.orb" ) ; } // Extract PROVIDER _ URL from environment
String provUrl = null ; if ( env != null ) { provUrl = ( String ) env . get ( javax . naming . Context . PROVIDER_URL ) ; } if ( provUrl != null && ! isCorbaUrl ( provUrl ) ) { // Initialize the root naming context by using the IOR supplied
// in the PROVIDER _ URL
ncIor = getStringifiedIor ( provUrl ) ; if ( inOrb == null ) { // no ORB instance specified ; create one using env and defaults
inOrb = CorbaORBService . getCurrent ( ) ; } setOrbAndRootContext ( inOrb , ncIor ) ; } else if ( provUrl != null ) { // Initialize the root naming context by using the URL supplied
// in the PROVIDER _ URL
String insName = initUsingUrl ( inOrb , provUrl , env ) ; // If name supplied in URL , resolve it to a NamingContext
if ( insName . length ( ) > 0 ) { _name = parser . nameToCosName ( parser . parse ( insName ) ) ; try { org . omg . CORBA . Object obj = _nc . resolve ( _name ) ; _nc = NamingContextHelper . narrow ( obj ) ; if ( _nc == null ) { throw IIOPLogger . ROOT_LOGGER . notANamingContext ( insName ) ; } } catch ( org . omg . CORBA . BAD_PARAM e ) { throw IIOPLogger . ROOT_LOGGER . notANamingContext ( insName ) ; } catch ( Exception e ) { throw org . wildfly . iiop . openjdk . naming . jndi . ExceptionMapper . mapException ( e , this , _name ) ; } } } else { // No PROVIDER _ URL supplied ; initialize using defaults
if ( inOrb == null ) { // No ORB instance specified ; create one using env and defaults
inOrb = CorbaORBService . getCurrent ( ) ; IIOPLogger . ROOT_LOGGER . debugf ( "Getting default ORB %s" , inOrb ) ; } setOrbAndRootContext ( inOrb , ( String ) null ) ; }


signature:
public class CNCtx { /** * Handles " iiop " and " iiopname " URLs ( INS 98-10-11) */
private String initUsingIiopUrl ( ORB defOrb , String url , Hashtable env ) throws NamingException { } }

implementation:
try { IiopUrl parsedUrl = new IiopUrl ( url ) ; Vector addrs = parsedUrl . getAddresses ( ) ; IiopUrl . Address addr ; NamingException savedException = null ; for ( int i = 0 ; i < addrs . size ( ) ; i ++ ) { addr = ( IiopUrl . Address ) addrs . elementAt ( i ) ; try { if ( defOrb != null ) { try { String tmpUrl = "corbaloc:iiop:" + addr . host + ":" + addr . port + "/NameService" ; org . omg . CORBA . Object rootCtx = defOrb . string_to_object ( tmpUrl ) ; setOrbAndRootContext ( defOrb , rootCtx ) ; return parsedUrl . getStringName ( ) ; } catch ( Exception e ) { } // keep going
} // Get ORB
ORB orb = CorbaUtils . getOrb ( addr . host , addr . port , env ) ; // Assign to fields
setOrbAndRootContext ( orb , ( String ) null ) ; return parsedUrl . getStringName ( ) ; } catch ( NamingException ne ) { savedException = ne ; } } if ( savedException != null ) { throw savedException ; } else { throw IIOPLogger . ROOT_LOGGER . invalidURLOrIOR ( url ) ; } } catch ( MalformedURLException e ) { throw new ConfigurationException ( e . getMessage ( ) ) ; }


signature:
public class CNCtx { /** * Initializes using " corbaname " URL ( INS 99-12-03) */
private String initUsingCorbanameUrl ( ORB orb , String url , Hashtable env ) throws NamingException { } }

implementation:
try { org . wildfly . iiop . openjdk . naming . jndi . CorbanameUrl parsedUrl = new org . wildfly . iiop . openjdk . naming . jndi . CorbanameUrl ( url ) ; String corbaloc = parsedUrl . getLocation ( ) ; String cosName = parsedUrl . getStringName ( ) ; if ( orb == null ) { // No ORB instance specified ; create one using env and defaults
orb = CorbaORBService . getCurrent ( ) ; } setOrbAndRootContext ( orb , corbaloc ) ; return parsedUrl . getStringName ( ) ; } catch ( MalformedURLException e ) { throw new ConfigurationException ( e . getMessage ( ) ) ; }


signature:
public class CNCtx { /** * Does the job of calling the COS Naming API ,
 * resolve , and performs the exception mapping . If the resolved
 * object is a COS Naming Context ( sub - context ) , then this function
 * returns a new JNDI naming context object .
 * @ param path the NameComponent [ ] object .
 * @ return Resolved object returned by the COS Name Server .
 * @ throws NotFound No objects under the name .
 * @ throws org . omg . CosNaming . NamingContextPackage . CannotProceed Unable to obtain a continuation context
 * @ throws org . omg . CosNaming . NamingContextPackage . InvalidName Name not understood . */
java . lang . Object callResolve ( NameComponent [ ] path ) throws NamingException { } }

implementation: try { org . omg . CORBA . Object obj = _nc . resolve ( path ) ; try { NamingContext nc = NamingContextHelper . narrow ( obj ) ; if ( nc != null ) { return new CNCtx ( _orb , nc , _env , makeFullName ( path ) ) ; } else { return obj ; } } catch ( org . omg . CORBA . SystemException e ) { return obj ; } } catch ( Exception e ) { throw org . wildfly . iiop . openjdk . naming . jndi . ExceptionMapper . mapException ( e , this , path ) ; }


signature:
public class CNCtx { /** * Converts the " String " name into a CompositeName
 * returns the object resolved by the COS Naming api ,
 * resolve . Returns the current context if the name is empty .
 * Returns either an org . omg . CORBA . Object or javax . naming . Context object .
 * @ param name string used to resolve the object .
 * @ return the resolved object
 * @ throws NamingException See callResolve . */
public java . lang . Object lookup ( String name ) throws NamingException { } }

implementation: return lookup ( new CompositeName ( name ) ) ;


signature:
public class CNCtx { /** * Converts the " Name " name into a NameComponent [ ] object and
 * returns the object resolved by the COS Naming api ,
 * resolve . Returns the current context if the name is empty .
 * Returns either an org . omg . CORBA . Object or javax . naming . Context object .
 * @ param name JNDI Name used to resolve the object .
 * @ return the resolved object
 * @ throws NamingException See callResolve . */
public java . lang . Object lookup ( Name name ) throws NamingException { } }

implementation:
if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( name . toString ( ) ) ; if ( name . size ( ) == 0 ) return this ; // % % % should clone ( ) so that env can be changed
NameComponent [ ] path = org . wildfly . iiop . openjdk . naming . jndi . CNNameParser . nameToCosName ( name ) ; try { java . lang . Object answer = callResolve ( path ) ; try { return NamingManager . getObjectInstance ( answer , name , this , _env ) ; } catch ( NamingException e ) { throw e ; } catch ( Exception e ) { NamingException ne = IIOPLogger . ROOT_LOGGER . errorGeneratingObjectViaFactory ( ) ; ne . setRootCause ( e ) ; throw ne ; } } catch ( CannotProceedException cpe ) { javax . naming . Context cctx = getContinuationContext ( cpe ) ; return cctx . lookup ( cpe . getRemainingName ( ) ) ; }


signature:
public class CNCtx { /** * Performs bind or rebind in the context depending on whether the
 * flag rebind is set . The only objects allowed to be bound are of
 * types org . omg . CORBA . Object , org . omg . CosNaming . NamingContext .
 * You can use a state factory to turn other objects ( such as
 * Remote ) into these acceptable forms .
 * Uses the COS Naming apis bind / rebind or
 * bind _ context / rebind _ context .
 * @ param pth NameComponent [ ] object
 * @ param obj Object to be bound .
 * @ param rebind perform rebind ? if true performs a rebind .
 * @ throws NotFound No objects under the name .
 * @ throws org . omg . CosNaming . NamingContextPackage . CannotProceed Unable to obtain a continuation context
 * @ throws org . omg . CosNaming . NamingContextPackage . AlreadyBound An object is already bound to this name . */
private void callBindOrRebind ( NameComponent [ ] pth , Name name , java . lang . Object obj , boolean rebind ) throws NamingException { } }

implementation:
if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( name . toString ( ) ) ; try { // Call state factories to convert
obj = NamingManager . getStateToBind ( obj , name , this , _env ) ; if ( obj instanceof CNCtx ) { // Use naming context object reference
obj = ( ( CNCtx ) obj ) . _nc ; } if ( obj instanceof org . omg . CosNaming . NamingContext ) { NamingContext nobj = NamingContextHelper . narrow ( ( org . omg . CORBA . Object ) obj ) ; if ( rebind ) _nc . rebind_context ( pth , nobj ) ; else _nc . bind_context ( pth , nobj ) ; } else if ( obj instanceof org . omg . CORBA . Object ) { if ( rebind ) _nc . rebind ( pth , ( org . omg . CORBA . Object ) obj ) ; else _nc . bind ( pth , ( org . omg . CORBA . Object ) obj ) ; } else throw IIOPLogger . ROOT_LOGGER . notACorbaObject ( ) ; } catch ( BAD_PARAM e ) { // probably narrow ( ) failed ?
NamingException ne = new NotContextException ( name . toString ( ) ) ; ne . setRootCause ( e ) ; throw ne ; } catch ( Exception e ) { throw org . wildfly . iiop . openjdk . naming . jndi . ExceptionMapper . mapException ( e , this , pth ) ; }


signature:
public class CNCtx { /** * Converts the " Name " name into a NameComponent [ ] object and
 * performs the bind operation . Uses callBindOrRebind . Throws an
 * invalid name exception if the name is empty . We need a name to
 * bind the object even when we work within the current context .
 * @ param name JNDI Name object
 * @ param obj Object to be bound .
 * @ throws NamingException See callBindOrRebind */
public void bind ( Name name , java . lang . Object obj ) throws NamingException { } }

implementation: if ( name . size ( ) == 0 ) { throw IIOPLogger . ROOT_LOGGER . invalidEmptyName ( ) ; } NameComponent [ ] path = org . wildfly . iiop . openjdk . naming . jndi . CNNameParser . nameToCosName ( name ) ; try { callBindOrRebind ( path , name , obj , false ) ; } catch ( CannotProceedException e ) { javax . naming . Context cctx = getContinuationContext ( e ) ; cctx . bind ( e . getRemainingName ( ) , obj ) ; }


signature:
public class CNCtx { /** * Converts the " String " name into a CompositeName object and
 * performs the bind operation . Uses callBindOrRebind . Throws an
 * invalid name exception if the name is empty .
 * @ param name string
 * @ param obj Object to be bound .
 * @ throws NamingException See callBindOrRebind */
public void bind ( String name , java . lang . Object obj ) throws NamingException { } }

implementation: bind ( new CompositeName ( name ) , obj ) ;


signature:
public class CNCtx { /** * Calls the unbind api of COS Naming and uses the exception mapper
 * class to map the exceptions
 * @ param path NameComponent [ ] object
 * @ throws NotFound No objects under the name . If leaf
 * is not found , that ' s OK according to the JNDI spec
 * @ throws org . omg . CosNaming . NamingContextPackage . CannotProceed Unable to obtain a continuation context
 * @ throws org . omg . CosNaming . NamingContextPackage . InvalidName Name not understood . */
private void callUnbind ( NameComponent [ ] path ) throws NamingException { } }

implementation:
if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( path . toString ( ) ) ; try { _nc . unbind ( path ) ; } catch ( NotFound e ) { // If leaf is the one missing , return success
// as per JNDI spec
if ( leafNotFound ( e , path [ path . length - 1 ] ) ) { // do nothing
} else { throw org . wildfly . iiop . openjdk . naming . jndi . ExceptionMapper . mapException ( e , this , path ) ; } } catch ( Exception e ) { throw org . wildfly . iiop . openjdk . naming . jndi . ExceptionMapper . mapException ( e , this , path ) ; }


signature:
public class CNCtx { /** * Converts the " Name " name into a NameComponent [ ] object and
 * performs the unbind operation . Uses callUnbind . Throws an
 * invalid name exception if the name is empty .
 * @ param name string
 * @ throws NamingException See callUnbind */
public void unbind ( Name name ) throws NamingException { } }

implementation: if ( name . size ( ) == 0 ) throw IIOPLogger . ROOT_LOGGER . invalidEmptyName ( ) ; NameComponent [ ] path = org . wildfly . iiop . openjdk . naming . jndi . CNNameParser . nameToCosName ( name ) ; try { callUnbind ( path ) ; } catch ( CannotProceedException e ) { javax . naming . Context cctx = getContinuationContext ( e ) ; cctx . unbind ( e . getRemainingName ( ) ) ; }


signature:
public class CNCtx { /** * Renames an object . Since COS Naming does not support a rename
 * api , this method unbinds the object with the " oldName " and
 * creates a new binding .
 * @ param oldName string , existing name for the binding .
 * @ param newName string , name used to replace .
 * @ throws NamingException See bind */
public void rename ( String oldName , String newName ) throws NamingException { } }

implementation: rename ( new CompositeName ( oldName ) , new CompositeName ( newName ) ) ;


signature:
public class CNCtx { /** * Renames an object . Since COS Naming does not support a rename
 * api , this method unbinds the object with the " oldName " and
 * creates a new binding .
 * @ param oldName JNDI Name , existing name for the binding .
 * @ param newName JNDI Name , name used to replace .
 * @ throws NamingException See bind */
public void rename ( Name oldName , Name newName ) throws NamingException { } }

implementation: if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( oldName . toString ( ) ) ; if ( oldName . size ( ) == 0 || newName . size ( ) == 0 ) throw IIOPLogger . ROOT_LOGGER . invalidEmptyName ( ) ; java . lang . Object obj = lookup ( oldName ) ; bind ( newName , obj ) ; unbind ( oldName ) ;


signature:
public class CNCtx { /** * Returns a BindingEnumeration object which has a list of name
 * class pairs . Lists the current context if the name is empty .
 * @ param name JNDI Name
 * @ return a list of bindings as a BindingEnumeration .
 * @ throws NamingException all exceptions returned by lookup . */
public NamingEnumeration listBindings ( Name name ) throws NamingException { } }

implementation: if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( name . toString ( ) ) ; if ( name . size ( ) > 0 ) { try { java . lang . Object obj = lookup ( name ) ; if ( obj instanceof CNCtx ) { return new org . wildfly . iiop . openjdk . naming . jndi . CNBindingEnumeration ( ( CNCtx ) obj , true , _env ) ; } else { throw new NotContextException ( name . toString ( ) ) ; } } catch ( NamingException ne ) { throw ne ; } catch ( BAD_PARAM e ) { NamingException ne = new NotContextException ( name . toString ( ) ) ; ne . setRootCause ( e ) ; throw ne ; } } return new org . wildfly . iiop . openjdk . naming . jndi . CNBindingEnumeration ( this , false , _env ) ;


signature:
public class CNCtx { /** * Calls the destroy on the COS Naming Server
 * @ param nc The NamingContext object to use .
 * @ throws org . omg . CosNaming . NamingContextPackage . NotEmpty when the context is not empty and cannot be destroyed . */
private void callDestroy ( NamingContext nc ) throws NamingException { } }

implementation: if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( nc . toString ( ) ) ; try { nc . destroy ( ) ; } catch ( Exception e ) { throw org . wildfly . iiop . openjdk . naming . jndi . ExceptionMapper . mapException ( e , this , null ) ; }


signature:
public class CNCtx { /** * Uses the callDestroy function to destroy the context . Destroys
 * the current context if name is empty .
 * @ param name JNDI Name
 * @ throws javax . naming . OperationNotSupportedException when list is invoked
 * with a non - null argument */
public void destroySubcontext ( Name name ) throws NamingException { } }

implementation:
if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( name . toString ( ) ) ; NamingContext the_nc = _nc ; NameComponent [ ] path = org . wildfly . iiop . openjdk . naming . jndi . CNNameParser . nameToCosName ( name ) ; if ( name . size ( ) > 0 ) { try { javax . naming . Context ctx = ( javax . naming . Context ) callResolve ( path ) ; CNCtx cnc = ( CNCtx ) ctx ; the_nc = cnc . _nc ; cnc . close ( ) ; // remove the reference to the context
} catch ( ClassCastException e ) { throw new NotContextException ( name . toString ( ) ) ; } catch ( CannotProceedException e ) { javax . naming . Context cctx = getContinuationContext ( e ) ; cctx . destroySubcontext ( e . getRemainingName ( ) ) ; return ; } catch ( NameNotFoundException e ) { // If leaf is the one missing , return success
// as per JNDI spec
if ( e . getRootCause ( ) instanceof NotFound && leafNotFound ( ( NotFound ) e . getRootCause ( ) , path [ path . length - 1 ] ) ) { return ; // leaf missing OK
} throw e ; } catch ( NamingException e ) { throw e ; } } callDestroy ( the_nc ) ; callUnbind ( path ) ;


signature:
public class CNCtx { /** * Calls the bind _ new _ context COS naming api to create a new subcontext .
 * @ param path NameComponent [ ] object
 * @ return the new context object .
 * @ throws NotFound No objects under the name .
 * @ throws org . omg . CosNaming . NamingContextPackage . CannotProceed Unable to obtain a continuation context
 * @ throws org . omg . CosNaming . NamingContextPackage . InvalidName Name not understood .
 * @ throws org . omg . CosNaming . NamingContextPackage . AlreadyBound An object is already bound to this name . */
private javax . naming . Context callBindNewContext ( NameComponent [ ] path ) throws NamingException { } }

implementation: if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( path . toString ( ) ) ; try { NamingContext nctx = _nc . bind_new_context ( path ) ; return new CNCtx ( _orb , nctx , _env , makeFullName ( path ) ) ; } catch ( Exception e ) { throw org . wildfly . iiop . openjdk . naming . jndi . ExceptionMapper . mapException ( e , this , path ) ; }


signature:
public class CNCtx { /** * Uses the callBindNewContext convenience function to create a new
 * context . Throws an invalid name exception if the name is empty .
 * @ param name string
 * @ return the new context object .
 * @ throws NamingException See callBindNewContext */
public javax . naming . Context createSubcontext ( String name ) throws NamingException { } }

implementation: return createSubcontext ( new CompositeName ( name ) ) ;


signature:
public class CNCtx { /** * Is mapped to resolve in the COS Naming api .
 * @ param name string
 * @ return the resolved object .
 * @ throws NamingException See lookup . */
public java . lang . Object lookupLink ( String name ) throws NamingException { } }

implementation: return lookupLink ( new CompositeName ( name ) ) ;


signature:
public class CNCtx { /** * Adds to the environment for the current context .
 * Record change but do not reinitialize ORB .
 * @ param propName The property name .
 * @ param propValue The ORB .
 * @ return the previous value of this property if any . */
public java . lang . Object addToEnvironment ( String propName , java . lang . Object propValue ) throws NamingException { } }

implementation:
if ( _env == null ) { _env = new Hashtable ( 7 , 0.75f ) ; } else { // copy - on - write
_env = ( Hashtable ) _env . clone ( ) ; } return _env . put ( propName , propValue ) ;


signature:
public class CNCtx { /** * Record change but do not reinitialize ORB */
public java . lang . Object removeFromEnvironment ( String propName ) throws NamingException { } }

implementation:
if ( _env != null && _env . get ( propName ) != null ) { // copy - on - write
_env = ( Hashtable ) _env . clone ( ) ; return _env . remove ( propName ) ; } return null ;


signature:
public class AbstractProtocolResourceDefinition { /** * Builds transformations common to both stack protocols and transport . */
@ SuppressWarnings ( "deprecation" ) static void addTransformations ( ModelVersion version , ResourceTransformationDescriptionBuilder builder ) { } }

implementation: if ( JGroupsModel . VERSION_5_0_0 . requiresTransformation ( version ) ) { builder . getAttributeBuilder ( ) . setDiscard ( DiscardAttributeChecker . UNDEFINED , Attribute . STATISTICS_ENABLED . getDefinition ( ) ) . addRejectCheck ( RejectAttributeChecker . DEFINED , Attribute . STATISTICS_ENABLED . getDefinition ( ) ) . end ( ) ; } if ( JGroupsModel . VERSION_3_0_0 . requiresTransformation ( version ) ) { AttributeConverter typeConverter = new AttributeConverter . DefaultAttributeConverter ( ) { @ Override protected void convertAttribute ( PathAddress address , String name , ModelNode value , TransformationContext context ) { if ( ! value . isDefined ( ) ) { value . set ( address . getLastElement ( ) . getValue ( ) ) ; } } } ; builder . getAttributeBuilder ( ) . setDiscard ( new DiscardAttributeChecker . DiscardAttributeValueChecker ( Attribute . MODULE . getDefinition ( ) . getDefaultValue ( ) ) , Attribute . MODULE . getDefinition ( ) ) . addRejectCheck ( RejectAttributeChecker . DEFINED , Attribute . MODULE . getDefinition ( ) ) . setValueConverter ( typeConverter , DeprecatedAttribute . TYPE . getDefinition ( ) ) . end ( ) ; builder . addRawOperationTransformationOverride ( MapOperations . MAP_GET_DEFINITION . getName ( ) , new SimpleOperationTransformer ( new LegacyPropertyMapGetOperationTransformer ( ) ) ) ; for ( String opName : Operations . getAllWriteAttributeOperationNames ( ) ) { builder . addOperationTransformationOverride ( opName ) . inheritResourceAttributeDefinitions ( ) . setCustomOperationTransformer ( new LegacyPropertyWriteOperationTransformer ( ) ) ; } } PropertyResourceDefinition . buildTransformation ( version , builder ) ;


signature:
public class DsXmlParser { /** * Parse security
 * @ param reader The reader
 * @ return The result
 * @ throws javax . xml . stream . XMLStreamException
 * XMLStreamException
 * @ throws org . jboss . jca . common . metadata . ParserException
 * ParserException
 * @ throws org . jboss . jca . common . api . validator . ValidateException
 * ValidateException */
@ Override protected DsSecurity parseDsSecurity ( XMLStreamReader reader ) throws XMLStreamException , ParserException , ValidateException { } }

implementation:
String userName = null ; String password = null ; String securityDomain = null ; boolean elytronEnabled = false ; String authenticationContext = null ; Extension reauthPlugin = null ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { if ( DataSource . Tag . forName ( reader . getLocalName ( ) ) == DataSource . Tag . SECURITY ) { return new DsSecurityImpl ( userName , password , elytronEnabled ? authenticationContext : securityDomain , elytronEnabled , null , reauthPlugin ) ; } else { if ( DsSecurity . Tag . forName ( reader . getLocalName ( ) ) == DsSecurity . Tag . UNKNOWN ) { throw new ParserException ( bundle . unexpectedEndTag ( reader . getLocalName ( ) ) ) ; } } break ; } case START_ELEMENT : { DsSecurity . Tag tag = DsSecurity . Tag . forName ( reader . getLocalName ( ) ) ; switch ( tag ) { case PASSWORD : { password = elementAsString ( reader ) ; boolean resolved = false ; if ( propertyReplacer != null && password != null && password . trim ( ) . length ( ) != 0 ) { String resolvedPassword = propertyReplacer . replaceProperties ( password ) ; if ( resolvedPassword != null ) { password = resolvedPassword ; resolved = true ; } } // Previous releases directly passed the text into PropertyResolver , which would not
// deal properly with $ { and } , : defaultValue etc . But it would resolve e . g . " sys . prop . foo "
// to " 123 " if there was a system property " sys . prop . foo " . So , to avoid breaking folks
// who learned to use that behavior , pass any unresolved password in to the PropertyResolver
if ( ! resolved && propertyResolver != null && password != null && password . trim ( ) . length ( ) != 0 ) { String resolvedPassword = propertyResolver . resolve ( password ) ; if ( resolvedPassword != null ) { password = resolvedPassword ; } } break ; } case USER_NAME : { userName = elementAsString ( reader ) ; break ; } case SECURITY_DOMAIN : { securityDomain = elementAsString ( reader ) ; break ; } case ELYTRON_ENABLED : { Boolean value = elementAsBoolean ( reader ) ; elytronEnabled = value == null ? true : value ; break ; } case AUTHENTICATION_CONTEXT : { authenticationContext = elementAsString ( reader ) ; break ; } case REAUTH_PLUGIN : { reauthPlugin = parseExtension ( reader , tag . getLocalName ( ) ) ; break ; } default : throw new ParserException ( bundle . unexpectedElement ( reader . getLocalName ( ) ) ) ; } break ; } } } throw new ParserException ( bundle . unexpectedEndOfDocument ( ) ) ;


signature:
public class DsXmlParser { /** * parse credential tag
 * @ param reader reader
 * @ return the parse Object
 * @ throws XMLStreamException in case of error
 * @ throws ParserException in case of error
 * @ throws ValidateException in case of error */
@ Override protected Credential parseCredential ( XMLStreamReader reader ) throws XMLStreamException , ParserException , ValidateException { } }

implementation: String userName = null ; String password = null ; String securityDomain = null ; boolean elytronEnabled = false ; String authenticationContext = null ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { if ( DataSource . Tag . forName ( reader . getLocalName ( ) ) == DataSource . Tag . SECURITY || Recovery . Tag . forName ( reader . getLocalName ( ) ) == Recovery . Tag . RECOVER_CREDENTIAL ) { return new CredentialImpl ( userName , password , elytronEnabled ? authenticationContext : securityDomain , elytronEnabled , null ) ; } else { if ( Credential . Tag . forName ( reader . getLocalName ( ) ) == Credential . Tag . UNKNOWN ) { throw new ParserException ( bundle . unexpectedEndTag ( reader . getLocalName ( ) ) ) ; } } break ; } case START_ELEMENT : { switch ( Credential . Tag . forName ( reader . getLocalName ( ) ) ) { case PASSWORD : { password = elementAsString ( reader ) ; if ( propertyResolver != null && password != null ) { String resolvedPassword = propertyResolver . resolve ( password ) ; if ( resolvedPassword != null ) password = resolvedPassword ; } break ; } case USER_NAME : { userName = elementAsString ( reader ) ; break ; } case SECURITY_DOMAIN : { securityDomain = elementAsString ( reader ) ; break ; } case ELYTRON_ENABLED : { Boolean value = elementAsBoolean ( reader ) ; elytronEnabled = value == null ? true : value ; break ; } case AUTHENTICATION_CONTEXT : { authenticationContext = elementAsString ( reader ) ; break ; } default : throw new ParserException ( bundle . unexpectedElement ( reader . getLocalName ( ) ) ) ; } break ; } } } throw new ParserException ( bundle . unexpectedEndOfDocument ( ) ) ;


signature:
public class EJB3SubsystemXMLPersister { /** * { @ inheritDoc } */
@ Override public void writeContent ( final XMLExtendedStreamWriter writer , final SubsystemMarshallingContext context ) throws XMLStreamException { } }

implementation:
context . startSubsystemElement ( EJB3SubsystemNamespace . EJB3_5_0 . getUriString ( ) , false ) ; writeElements ( writer , context ) ; // write the subsystem end element
writer . writeEndElement ( ) ;


signature:
public class EJB3SubsystemXMLPersister { /** * Writes out the < mdb > element and its nested elements
 * @ param writer XML writer
 * @ param mdbModelNode The < mdb > element { @ link org . jboss . dmr . ModelNode }
 * @ throws javax . xml . stream . XMLStreamException */
private void writeMDB ( final XMLExtendedStreamWriter writer , final ModelNode mdbModelNode ) throws XMLStreamException { } }

implementation:
if ( mdbModelNode . hasDefined ( EJB3SubsystemModel . DEFAULT_RESOURCE_ADAPTER_NAME ) ) { // < resource - adapter - ref >
writer . writeStartElement ( EJB3SubsystemXMLElement . RESOURCE_ADAPTER_REF . getLocalName ( ) ) ; final String resourceAdapterName = mdbModelNode . get ( EJB3SubsystemModel . DEFAULT_RESOURCE_ADAPTER_NAME ) . asString ( ) ; // write the value
writer . writeAttribute ( EJB3SubsystemXMLAttribute . RESOURCE_ADAPTER_NAME . getLocalName ( ) , resourceAdapterName ) ; // < / resource - adapter - ref >
writer . writeEndElement ( ) ; } if ( mdbModelNode . hasDefined ( EJB3SubsystemModel . DEFAULT_MDB_INSTANCE_POOL ) ) { // < bean - instance - pool - ref >
writer . writeStartElement ( EJB3SubsystemXMLElement . BEAN_INSTANCE_POOL_REF . getLocalName ( ) ) ; final String poolRefName = mdbModelNode . get ( EJB3SubsystemModel . DEFAULT_MDB_INSTANCE_POOL ) . asString ( ) ; // write the value
writer . writeAttribute ( EJB3SubsystemXMLAttribute . POOL_NAME . getLocalName ( ) , poolRefName ) ; // < / bean - instance - pool - ref >
writer . writeEndElement ( ) ; } if ( mdbModelNode . hasDefined ( EJB3SubsystemModel . MDB_DELIVERY_GROUP ) ) { // < delivery - groups >
writer . writeStartElement ( EJB3SubsystemXMLElement . DELIVERY_GROUPS . getLocalName ( ) ) ; for ( Property property : mdbModelNode . get ( EJB3SubsystemModel . MDB_DELIVERY_GROUP ) . asPropertyList ( ) ) { // < delivery - group
writer . writeStartElement ( EJB3SubsystemXMLElement . DELIVERY_GROUP . getLocalName ( ) ) ; // name =
writer . writeAttribute ( EJB3SubsystemXMLAttribute . NAME . getLocalName ( ) , property . getName ( ) ) ; // active =
MdbDeliveryGroupResourceDefinition . ACTIVE . marshallAsAttribute ( mdbModelNode . get ( EJB3SubsystemModel . MDB_DELIVERY_GROUP , property . getName ( ) ) , writer ) ; writer . writeEndElement ( ) ; } // < / delivery - groups >
writer . writeEndElement ( ) ; }


signature:
public class EJB3SubsystemXMLPersister { /** * Writes out the < entity - bean > element and its nested elements
 * @ param writer XML writer
 * @ param entityModelNode The < mdb > element { @ link org . jboss . dmr . ModelNode }
 * @ throws javax . xml . stream . XMLStreamException */
private void writeEntityBean ( final XMLExtendedStreamWriter writer , final ModelNode entityModelNode ) throws XMLStreamException { } }

implementation:
if ( entityModelNode . hasDefined ( EJB3SubsystemModel . DEFAULT_ENTITY_BEAN_INSTANCE_POOL ) ) { // < bean - instance - pool - ref >
writer . writeStartElement ( EJB3SubsystemXMLElement . BEAN_INSTANCE_POOL_REF . getLocalName ( ) ) ; final String poolRefName = entityModelNode . get ( EJB3SubsystemModel . DEFAULT_ENTITY_BEAN_INSTANCE_POOL ) . asString ( ) ; // write the value
writer . writeAttribute ( EJB3SubsystemXMLAttribute . POOL_NAME . getLocalName ( ) , poolRefName ) ; // < / bean - instance - pool - ref >
writer . writeEndElement ( ) ; } if ( entityModelNode . hasDefined ( EJB3SubsystemModel . DEFAULT_ENTITY_BEAN_OPTIMISTIC_LOCKING ) ) { // < optimistic - locking >
writer . writeStartElement ( EJB3SubsystemXMLElement . OPTIMISTIC_LOCKING . getLocalName ( ) ) ; final Boolean locking = entityModelNode . get ( EJB3SubsystemModel . DEFAULT_ENTITY_BEAN_OPTIMISTIC_LOCKING ) . asBoolean ( ) ; // write the value
writer . writeAttribute ( EJB3SubsystemXMLAttribute . ENABLED . getLocalName ( ) , locking . toString ( ) ) ; // < optimistic - locking >
writer . writeEndElement ( ) ; }


signature:
public class EJB3SubsystemXMLPersister { /** * Persist as a passivation - store using relevant attributes */
private void writeClusterPassivationStores ( XMLExtendedStreamWriter writer , ModelNode model ) throws XMLStreamException { } }

implementation:
if ( model . hasDefined ( EJB3SubsystemModel . CLUSTER_PASSIVATION_STORE ) ) { List < Property > caches = model . get ( EJB3SubsystemModel . CLUSTER_PASSIVATION_STORE ) . asPropertyList ( ) ; for ( Property property : caches ) { // < strict - max - pool >
writer . writeStartElement ( EJB3SubsystemXMLElement . CLUSTER_PASSIVATION_STORE . getLocalName ( ) ) ; ModelNode store = property . getValue ( ) ; writer . writeAttribute ( EJB3SubsystemXMLAttribute . NAME . getLocalName ( ) , property . getName ( ) ) ; LegacyPassivationStoreResourceDefinition . IDLE_TIMEOUT . marshallAsAttribute ( store , writer ) ; LegacyPassivationStoreResourceDefinition . IDLE_TIMEOUT_UNIT . marshallAsAttribute ( store , writer ) ; ClusterPassivationStoreResourceDefinition . MAX_SIZE . marshallAsAttribute ( store , writer ) ; ClusterPassivationStoreResourceDefinition . CACHE_CONTAINER . marshallAsAttribute ( store , writer ) ; ClusterPassivationStoreResourceDefinition . BEAN_CACHE . marshallAsAttribute ( store , writer ) ; ClusterPassivationStoreResourceDefinition . CLIENT_MAPPINGS_CACHE . marshallAsAttribute ( store , writer ) ; ClusterPassivationStoreResourceDefinition . PASSIVATE_EVENTS_ON_REPLICATE . marshallAsAttribute ( store , writer ) ; writer . writeEndElement ( ) ; } }


signature:
public class EJB3SubsystemXMLPersister { /** * Persist as a passivation - store using relevant attributes */
private void writeFilePassivationStores ( XMLExtendedStreamWriter writer , ModelNode model ) throws XMLStreamException { } }

implementation:
if ( model . hasDefined ( EJB3SubsystemModel . FILE_PASSIVATION_STORE ) ) { List < Property > caches = model . get ( EJB3SubsystemModel . FILE_PASSIVATION_STORE ) . asPropertyList ( ) ; for ( Property property : caches ) { // < strict - max - pool >
writer . writeStartElement ( EJB3SubsystemXMLElement . FILE_PASSIVATION_STORE . getLocalName ( ) ) ; ModelNode store = property . getValue ( ) ; writer . writeAttribute ( EJB3SubsystemXMLAttribute . NAME . getLocalName ( ) , property . getName ( ) ) ; LegacyPassivationStoreResourceDefinition . IDLE_TIMEOUT . marshallAsAttribute ( store , writer ) ; LegacyPassivationStoreResourceDefinition . IDLE_TIMEOUT_UNIT . marshallAsAttribute ( store , writer ) ; FilePassivationStoreResourceDefinition . MAX_SIZE . marshallAsAttribute ( store , writer ) ; FilePassivationStoreResourceDefinition . RELATIVE_TO . marshallAsAttribute ( store , writer ) ; FilePassivationStoreResourceDefinition . GROUPS_PATH . marshallAsAttribute ( store , writer ) ; FilePassivationStoreResourceDefinition . SESSIONS_PATH . marshallAsAttribute ( store , writer ) ; FilePassivationStoreResourceDefinition . SUBDIRECTORY_COUNT . marshallAsAttribute ( store , writer ) ; writer . writeEndElement ( ) ; } }


signature:
public class JNDIBasedSecurityManagement { /** * { @ inheritDoc } */
public AuditManager getAuditManager ( String securityDomain ) { } }

implementation: AuditManager am = null ; try { am = auditMgrMap . get ( securityDomain ) ; if ( am == null ) { am = ( AuditManager ) lookUpJNDI ( securityDomain + "/auditMgr" ) ; auditMgrMap . put ( securityDomain , am ) ; } } catch ( Exception e ) { SecurityLogger . ROOT_LOGGER . tracef ( e , "Exception getting AuditManager for domain=%s" , securityDomain ) ; } return am ;


signature:
public class JNDIBasedSecurityManagement { /** * { @ inheritDoc } */
public AuthenticationManager getAuthenticationManager ( String securityDomain ) { } }

implementation: AuthenticationManager am = null ; try { am = authMgrMap . get ( securityDomain ) ; if ( am == null ) { am = ( AuthenticationManager ) lookUpJNDI ( securityDomain + "/authenticationMgr" ) ; authMgrMap . put ( securityDomain , am ) ; } } catch ( Exception e ) { SecurityLogger . ROOT_LOGGER . tracef ( e , "Exception getting AuthenticationManager for domain=%s" , securityDomain ) ; } return am ;


signature:
public class JNDIBasedSecurityManagement { /** * { @ inheritDoc } */
public AuthorizationManager getAuthorizationManager ( String securityDomain ) { } }

implementation: AuthorizationManager am = null ; try { am = authzMgrMap . get ( securityDomain ) ; if ( am == null ) { am = ( AuthorizationManager ) lookUpJNDI ( securityDomain + "/authorizationMgr" ) ; authzMgrMap . put ( securityDomain , am ) ; } } catch ( Exception e ) { SecurityLogger . ROOT_LOGGER . tracef ( e , "Exception getting AuthorizationManager for domain=%s" , securityDomain ) ; } return am ;


signature:
public class JNDIBasedSecurityManagement { /** * { @ inheritDoc } */
public IdentityTrustManager getIdentityTrustManager ( String securityDomain ) { } }

implementation: IdentityTrustManager itm = null ; try { itm = idmMgrMap . get ( securityDomain ) ; if ( itm == null ) { itm = ( IdentityTrustManager ) lookUpJNDI ( securityDomain + "/identityTrustMgr" ) ; idmMgrMap . put ( securityDomain , itm ) ; } } catch ( Exception e ) { SecurityLogger . ROOT_LOGGER . tracef ( e , "Exception getting IdentityTrustManager for domain=%s" + securityDomain ) ; } return itm ;


signature:
public class JNDIBasedSecurityManagement { /** * { @ inheritDoc } */
public MappingManager getMappingManager ( String securityDomain ) { } }

implementation: MappingManager mm = null ; try { mm = mappingMgrMap . get ( securityDomain ) ; if ( mm == null ) { mm = ( MappingManager ) lookUpJNDI ( securityDomain + "/mappingMgr" ) ; mappingMgrMap . put ( securityDomain , mm ) ; } } catch ( Exception e ) { SecurityLogger . ROOT_LOGGER . tracef ( e , "Exception getting MappingManager for domain=%s" , securityDomain ) ; } return mm ;


signature:
public class JNDIBasedSecurityManagement { /** * { @ inheritDoc } */
public JSSESecurityDomain getJSSE ( String securityDomain ) { } }

implementation: JSSESecurityDomain jsse = null ; try { jsse = jsseMap . get ( securityDomain ) ; if ( jsse == null ) { jsse = ( JSSESecurityDomain ) lookUpJNDI ( securityDomain + "/jsse" ) ; jsseMap . put ( securityDomain , jsse ) ; } } catch ( Exception e ) { SecurityLogger . ROOT_LOGGER . tracef ( e , "Exception getting JSSESecurityDomain for domain=%s" , securityDomain ) ; } return jsse ;


signature:
public class JNDIBasedSecurityManagement { /** * Removes one security domain from the maps
 * @ param securityDomain name of the security domain */
public void removeSecurityDomain ( String securityDomain ) { } }

implementation: securityMgrMap . remove ( securityDomain ) ; auditMgrMap . remove ( securityDomain ) ; authMgrMap . remove ( securityDomain ) ; authzMgrMap . remove ( securityDomain ) ; idmMgrMap . remove ( securityDomain ) ; mappingMgrMap . remove ( securityDomain ) ; jsseMap . remove ( securityDomain ) ;


signature:
public class JNDIBasedSecurityManagement { /** * Lookup a context in JNDI
 * @ param contextName the context
 * @ return the Object found at the context or null if there is nothing bound */
private Object lookUpJNDI ( String contextName ) { } }

implementation: Object result = null ; try { Context ctx = new InitialContext ( ) ; if ( contextName . startsWith ( SecurityConstants . JAAS_CONTEXT_ROOT ) ) result = ctx . lookup ( contextName ) ; else result = ctx . lookup ( SecurityConstants . JAAS_CONTEXT_ROOT + contextName ) ; } catch ( Exception e ) { SecurityLogger . ROOT_LOGGER . tracef ( "Look up of JNDI for %s failed with %s" , contextName , e . getLocalizedMessage ( ) ) ; return null ; } return result ;


signature:
public class JNDIBasedSecurityManagement { /** * Creates a { @ code SecurityDomainContext }
 * @ param securityDomain name of the security domain
 * @ param cacheFactory creates a cache implementation
 * @ return an instance of { @ code SecurityDomainContext }
 * @ throws Exception if an error occurs during creation */
public SecurityDomainContext createSecurityDomainContext ( String securityDomain , AuthenticationCacheFactory cacheFactory ) throws Exception { } }

implementation: return createSecurityDomainContext ( securityDomain , cacheFactory , null ) ;


signature:
public class JNDIBasedSecurityManagement { /** * Creates a { @ code SecurityDomainContext } optionally including a { @ link JSSESecurityDomain }
 * @ param securityDomain name of the security domain . Cannot be { @ code null }
 * @ param cacheFactory creates a cache implementation . Cannot be { @ code null }
 * @ param jsseSecurityDomain a JSSE security domain . May be { @ code null }
 * @ return an instance of { @ code SecurityDomainContext }
 * @ throws Exception if an error occurs during creation */
public SecurityDomainContext createSecurityDomainContext ( String securityDomain , AuthenticationCacheFactory cacheFactory , JSSESecurityDomain jsseSecurityDomain ) throws Exception { } }

implementation:
SecurityLogger . ROOT_LOGGER . debugf ( "Creating SDC for domain = %s" , securityDomain ) ; AuthenticationManager am = createAuthenticationManager ( securityDomain ) ; if ( cacheFactory != null && am instanceof CacheableManager ) { // create authentication cache
final Map < Principal , ? > cache = cacheFactory . getCache ( ) ; if ( cache != null ) { @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) CacheableManager < Map , Principal > cm = ( CacheableManager < Map , Principal > ) am ; cm . setCache ( cache ) ; } } // set DeepCopySubject option if supported
if ( deepCopySubjectMode ) { setDeepCopySubjectMode ( am ) ; } return new SecurityDomainContext ( am , createAuthorizationManager ( securityDomain ) , createAuditManager ( securityDomain ) , createIdentityTrustManager ( securityDomain ) , createMappingManager ( securityDomain ) , jsseSecurityDomain ) ;


signature:
public class JNDIBasedSecurityManagement { /** * Creates an { @ code AuthenticationManager }
 * @ param securityDomain name of the security domain
 * @ return an instance of { @ code AuthenticationManager }
 * @ throws Exception if creation fails */
private AuthenticationManager createAuthenticationManager ( String securityDomain ) throws Exception { } }

implementation: int i = callbackHandlerClassName . lastIndexOf ( ":" ) ; if ( i == - 1 ) throw SecurityLogger . ROOT_LOGGER . missingModuleName ( "default-callback-handler-class-name attribute" ) ; String moduleSpec = callbackHandlerClassName . substring ( 0 , i ) ; String className = callbackHandlerClassName . substring ( i + 1 ) ; Class < ? > callbackHandlerClazz = SecurityActions . getModuleClassLoader ( loader , moduleSpec ) . loadClass ( className ) ; CallbackHandler ch = ( CallbackHandler ) callbackHandlerClazz . newInstance ( ) ; i = authenticationManagerClassName . lastIndexOf ( ":" ) ; if ( i == - 1 ) throw SecurityLogger . ROOT_LOGGER . missingModuleName ( "authentication-manager-class-name attribute" ) ; moduleSpec = authenticationManagerClassName . substring ( 0 , i ) ; className = authenticationManagerClassName . substring ( i + 1 ) ; Class < ? > clazz = SecurityActions . getModuleClassLoader ( loader , moduleSpec ) . loadClass ( className ) ; Constructor < ? > ctr = clazz . getConstructor ( new Class [ ] { String . class , CallbackHandler . class } ) ; return ( AuthenticationManager ) ctr . newInstance ( new Object [ ] { securityDomain , ch } ) ;


signature:
public class JNDIBasedSecurityManagement { /** * Creates an { @ code AuthorizationManager }
 * @ param securityDomain name of the security domain
 * @ return an instance of { @ code AuthorizationManager }
 * @ throws Exception if creation fails */
private AuthorizationManager createAuthorizationManager ( String securityDomain ) throws Exception { } }

implementation: int i = authorizationManagerClassName . lastIndexOf ( ":" ) ; if ( i == - 1 ) throw SecurityLogger . ROOT_LOGGER . missingModuleName ( "authorization manager class" ) ; String moduleSpec = authorizationManagerClassName . substring ( 0 , i ) ; String className = authorizationManagerClassName . substring ( i + 1 ) ; Class < ? > clazz = SecurityActions . getModuleClassLoader ( loader , moduleSpec ) . loadClass ( className ) ; Constructor < ? > ctr = clazz . getConstructor ( new Class [ ] { String . class } ) ; return ( AuthorizationManager ) ctr . newInstance ( new Object [ ] { securityDomain } ) ;


signature:
public class JNDIBasedSecurityManagement { /** * Creates an { @ code AuditManager }
 * @ param securityDomain name of the security domain
 * @ return an instance of { @ code AuditManager }
 * @ throws Exception if creation fails */
private AuditManager createAuditManager ( String securityDomain ) throws Exception { } }

implementation: int i = auditManagerClassName . lastIndexOf ( ":" ) ; if ( i == - 1 ) throw SecurityLogger . ROOT_LOGGER . missingModuleName ( "audit manager class" ) ; String moduleSpec = auditManagerClassName . substring ( 0 , i ) ; String className = auditManagerClassName . substring ( i + 1 ) ; Class < ? > clazz = SecurityActions . getModuleClassLoader ( loader , moduleSpec ) . loadClass ( className ) ; Constructor < ? > ctr = clazz . getConstructor ( new Class [ ] { String . class } ) ; return ( AuditManager ) ctr . newInstance ( new Object [ ] { securityDomain } ) ;


signature:
public class JNDIBasedSecurityManagement { /** * Creates an { @ code IdentityTrustManager }
 * @ param securityDomain name of the security domain
 * @ return an instance of { @ code IdentityTrustManager }
 * @ throws Exception if creation fails */
private IdentityTrustManager createIdentityTrustManager ( String securityDomain ) throws Exception { } }

implementation: int i = identityTrustManagerClassName . lastIndexOf ( ":" ) ; if ( i == - 1 ) throw SecurityLogger . ROOT_LOGGER . missingModuleName ( "identity trust manager class" ) ; String moduleSpec = identityTrustManagerClassName . substring ( 0 , i ) ; String className = identityTrustManagerClassName . substring ( i + 1 ) ; Class < ? > clazz = SecurityActions . getModuleClassLoader ( loader , moduleSpec ) . loadClass ( className ) ; Constructor < ? > ctr = clazz . getConstructor ( new Class [ ] { String . class } ) ; return ( IdentityTrustManager ) ctr . newInstance ( new Object [ ] { securityDomain } ) ;


signature:
public class JNDIBasedSecurityManagement { /** * Creates an { @ code MappingManager }
 * @ param securityDomain name of the security domain
 * @ return an instance of { @ code MappingManager }
 * @ throws Exception if creation fails */
private MappingManager createMappingManager ( String securityDomain ) throws Exception { } }

implementation: int i = mappingManagerClassName . lastIndexOf ( ":" ) ; if ( i == - 1 ) throw SecurityLogger . ROOT_LOGGER . missingModuleName ( "mapping manager class" ) ; String moduleSpec = mappingManagerClassName . substring ( 0 , i ) ; String className = mappingManagerClassName . substring ( i + 1 ) ; Class < ? > clazz = SecurityActions . getModuleClassLoader ( loader , moduleSpec ) . loadClass ( className ) ; Constructor < ? > ctr = clazz . getConstructor ( new Class [ ] { String . class } ) ; return ( MappingManager ) ctr . newInstance ( new Object [ ] { securityDomain } ) ;


signature:
public class JNDIBasedSecurityManagement { /** * Use reflection to attempt to set the deep copy subject mode on the { @ code AuthenticationManager }
 * @ param authenticationManager the { @ code AuthenticationManager } */
private static void setDeepCopySubjectMode ( AuthenticationManager authenticationManager ) { } }

implementation: try { Class < ? > [ ] argsType = { Boolean . class } ; Method m = authenticationManager . getClass ( ) . getMethod ( "setDeepCopySubjectOption" , argsType ) ; Object [ ] deepCopyArgs = { Boolean . TRUE } ; m . invoke ( authenticationManager , deepCopyArgs ) ; } catch ( Exception e ) { SecurityLogger . ROOT_LOGGER . tracef ( "Optional setDeepCopySubjectMode failed: %s" , e . getLocalizedMessage ( ) ) ; }


signature:
public class ScheduleExpressionTypeUtil { /** * Returns the corresponding { @ link org . jboss . as . ejb3 . timerservice . schedule . value . ScheduleExpressionType } for the passed value
 * @ param value The value to be parsed
 * @ return */
public static ScheduleExpressionType getType ( String value ) { } }

implementation:
if ( value == null ) { throw EjbLogger . EJB3_TIMER_LOGGER . valueIsNull ( ) ; } // Order of check is important .
// TODO : Explain why this order is important
if ( value . trim ( ) . equals ( "*" ) ) { return ScheduleExpressionType . WILDCARD ; } if ( value . contains ( "," ) ) { return ScheduleExpressionType . LIST ; } if ( value . contains ( "-" ) && RangeValue . accepts ( value ) ) { return ScheduleExpressionType . RANGE ; } if ( value . contains ( "/" ) ) { return ScheduleExpressionType . INCREMENT ; } return ScheduleExpressionType . SINGLE_VALUE ;


signature:
public class ModularReference { /** * Create a ModuleReference from a target type and factory class .
 * @ param type The class type for the reference
 * @ param factoryClass The factory class
 * @ return A ModularReference */
public static ModularReference create ( final Class < ? > type , final Class < ? > factoryClass ) { } }

implementation: return create ( type . getName ( ) , factoryClass ) ;


signature:
public class ModularReference { /** * Create a ModuleReference from a target class name and factory class .
 * @ param className The class name for the reference
 * @ param factoryClass The factory class
 * @ return A ModularReference */
public static ModularReference create ( final String className , final Class < ? > factoryClass ) { } }

implementation: return new ModularReference ( className , factoryClass . getName ( ) , Module . forClass ( factoryClass ) . getIdentifier ( ) ) ;


signature:
public class ModularReference { /** * Create a ModuleReference from a target type , reference address and factory class .
 * @ param type The class type for the reference
 * @ param addr The address of the object
 * @ param factoryClass The factory class
 * @ return A ModularReference */
public static ModularReference create ( final Class < ? > type , final RefAddr addr , final Class < ? > factoryClass ) { } }

implementation: return create ( type . getName ( ) , addr , factoryClass ) ;


signature:
public class StartStopService { /** * { @ inheritDoc } */
public void start ( final StartContext context ) { } }

implementation: super . start ( context ) ; if ( SarLogger . ROOT_LOGGER . isTraceEnabled ( ) ) { SarLogger . ROOT_LOGGER . tracef ( "Starting Service: %s" , context . getController ( ) . getName ( ) ) ; } final Runnable task = new Runnable ( ) { @ Override public void run ( ) { try { invokeLifecycleMethod ( startMethod , context ) ; context . complete ( ) ; } catch ( Throwable e ) { context . failed ( new StartException ( SarLogger . ROOT_LOGGER . failedExecutingLegacyMethod ( "start()" ) , e ) ) ; } } } ; try { executorSupplier . get ( ) . submit ( task ) ; } catch ( RejectedExecutionException e ) { task . run ( ) ; } finally { context . asynchronous ( ) ; }


signature:
public class StartStopService { /** * { @ inheritDoc } */
public void stop ( final StopContext context ) { } }

implementation: super . stop ( context ) ; if ( SarLogger . ROOT_LOGGER . isTraceEnabled ( ) ) { SarLogger . ROOT_LOGGER . tracef ( "Stopping Service: %s" , context . getController ( ) . getName ( ) ) ; } final Runnable task = new Runnable ( ) { @ Override public void run ( ) { try { invokeLifecycleMethod ( stopMethod , context ) ; } catch ( Exception e ) { SarLogger . ROOT_LOGGER . error ( SarLogger . ROOT_LOGGER . failedExecutingLegacyMethod ( "stop()" ) , e ) ; } finally { context . complete ( ) ; } } } ; try { executorSupplier . get ( ) . submit ( task ) ; } catch ( RejectedExecutionException e ) { task . run ( ) ; } finally { context . asynchronous ( ) ; }


signature:
public class CommandLineMain { /** * Creates a JBoss Diagnostic Reporter ( JDR ) Report . A JDR report response
 * is printed to < code > System . out < / code > .
 * @ param args ignored */
public static void main ( String [ ] args ) { } }

implementation:
int port = 9990 ; String host = "localhost" ; String protocol = "remote+http" ; String config = null ; try { CommandLine line = parser . parse ( options , args , false ) ; if ( line . hasOption ( "help" ) ) { formatter . printHelp ( usage , NEW_LINE + JdrLogger . ROOT_LOGGER . jdrDescriptionMessage ( ) , options , null ) ; return ; } if ( line . hasOption ( "host" ) ) { host = line . getOptionValue ( "host" ) ; } if ( line . hasOption ( "port" ) ) { port = Integer . parseInt ( line . getOptionValue ( "port" ) ) ; } if ( line . hasOption ( "protocol" ) ) { protocol = line . getOptionValue ( "protocol" ) ; } if ( line . hasOption ( "config" ) ) { config = line . getOptionValue ( "config" ) ; } } catch ( ParseException e ) { System . out . println ( e . getMessage ( ) ) ; formatter . printHelp ( usage , options ) ; return ; } catch ( NumberFormatException nfe ) { System . out . println ( nfe . getMessage ( ) ) ; formatter . printHelp ( usage , options ) ; return ; } System . out . println ( "Initializing JBoss Diagnostic Reporter..." ) ; // Try to run JDR on the Wildfly JVM
CLI cli = CLI . newInstance ( ) ; boolean embedded = false ; JdrReport report = null ; try { System . out . println ( String . format ( "Trying to connect to %s %s:%s" , protocol , host , port ) ) ; cli . connect ( protocol , host , port , null , null ) ; } catch ( IllegalStateException ex ) { System . out . println ( "Starting embedded server" ) ; String startEmbeddedServer = "embed-server --std-out=echo " + ( ( config != null && ! config . isEmpty ( ) ) ? ( " --server-config=" + config ) : "" ) ; cli . getCommandContext ( ) . handleSafe ( startEmbeddedServer ) ; embedded = true ; } try { Result cmdResult = cli . cmd ( "/subsystem=jdr:generate-jdr-report()" ) ; ModelNode response = cmdResult . getResponse ( ) ; if ( Operations . isSuccessfulOutcome ( response ) || ! embedded ) { reportFailure ( response ) ; ModelNode result = response . get ( ClientConstants . RESULT ) ; report = new JdrReport ( result ) ; } else { report = standaloneCollect ( cli , protocol , host , port ) ; } } catch ( IllegalStateException ise ) { System . out . println ( ise . getMessage ( ) ) ; report = standaloneCollect ( cli , protocol , host , port ) ; } finally { if ( cli != null ) { try { if ( embedded ) cli . getCommandContext ( ) . handleSafe ( "stop-embedded-server" ) ; else cli . disconnect ( ) ; } catch ( Exception e ) { System . out . println ( "Caught exception while disconnecting: " + e . getMessage ( ) ) ; } } } printJdrReportInfo ( report ) ; System . exit ( 0 ) ;


signature:
public class EJBClientDescriptor12Parser { /** * connectTimeout added */
protected void parseRemotingReceiver ( final XMLExtendedStreamReader reader , final EJBClientDescriptorMetaData ejbClientDescriptorMetaData ) throws XMLStreamException { } }

implementation:
String outboundConnectionRef = null ; final Set < EJBClientDescriptorXMLAttribute > required = EnumSet . of ( EJBClientDescriptorXMLAttribute . OUTBOUND_CONNECTION_REF ) ; final int count = reader . getAttributeCount ( ) ; EJBClientDescriptorMetaData . RemotingReceiverConfiguration remotingReceiverConfiguration = null ; long connectTimeout = 5000 ; for ( int i = 0 ; i < count ; i ++ ) { final EJBClientDescriptorXMLAttribute attribute = EJBClientDescriptorXMLAttribute . forName ( reader . getAttributeLocalName ( i ) ) ; required . remove ( attribute ) ; final String value = readResolveValue ( reader , i ) ; switch ( attribute ) { case OUTBOUND_CONNECTION_REF : outboundConnectionRef = value ; remotingReceiverConfiguration = ejbClientDescriptorMetaData . addRemotingReceiverConnectionRef ( outboundConnectionRef ) ; break ; case CONNECT_TIMEOUT : connectTimeout = Long . parseLong ( value ) ; break ; default : unexpectedContent ( reader ) ; } } if ( ! required . isEmpty ( ) ) { missingAttributes ( reader . getLocation ( ) , required ) ; } // set the timeout
remotingReceiverConfiguration . setConnectionTimeout ( connectTimeout ) ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { return ; } case START_ELEMENT : { final EJBClientDescriptorXMLElement element = EJBClientDescriptorXMLElement . forName ( reader . getLocalName ( ) ) ; switch ( element ) { case CHANNEL_CREATION_OPTIONS : final Properties channelCreationOptions = this . parseChannelCreationOptions ( reader ) ; remotingReceiverConfiguration . setChannelCreationOptions ( channelCreationOptions ) ; break ; default : unexpectedElement ( reader ) ; } break ; } default : { unexpectedContent ( reader ) ; } } } unexpectedEndOfDocument ( reader . getLocation ( ) ) ;


signature:
public class IDLTypeImpl { /** * Return the LocalIDLType for the given TypeCode . */
static LocalIDLType getIDLType ( TypeCode typeCode , RepositoryImpl repository ) { } }

implementation: TCKind tcKind = typeCode . kind ( ) ; if ( PrimitiveDefImpl . isPrimitiveTCKind ( tcKind ) ) return new PrimitiveDefImpl ( typeCode , repository ) ; if ( tcKind == TCKind . tk_sequence ) return repository . getSequenceImpl ( typeCode ) ; if ( tcKind == TCKind . tk_value || tcKind == TCKind . tk_value_box || tcKind == TCKind . tk_alias || tcKind == TCKind . tk_struct || tcKind == TCKind . tk_union || tcKind == TCKind . tk_enum || tcKind == TCKind . tk_objref ) { try { return ( LocalIDLType ) repository . _lookup_id ( typeCode . id ( ) ) ; } catch ( BadKind ex ) { throw IIOPLogger . ROOT_LOGGER . badKindForTypeCode ( tcKind . value ( ) ) ; } } throw IIOPLogger . ROOT_LOGGER . badKindForTypeCode ( tcKind . value ( ) ) ;


signature:
public class SecurityDomainResourceDefinition { /** * Wait for the required service to start up and fail otherwise . This method is necessary when a runtime operation
 * uses a service that might have been created within a composite operation .
 * This method will wait at most 100 millis .
 * @ param controller the service to wait for
 * @ throws OperationFailedException if the service is not available , or the thread was interrupted . */
private static void waitForService ( final ServiceController < ? > controller ) throws OperationFailedException { } }

implementation: if ( controller . getState ( ) == ServiceController . State . UP ) return ; final StabilityMonitor monitor = new StabilityMonitor ( ) ; monitor . addController ( controller ) ; try { monitor . awaitStability ( 100 , MILLISECONDS ) ; } catch ( final InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throw SecurityLogger . ROOT_LOGGER . interruptedWaitingForSecurityDomain ( controller . getName ( ) . getSimpleName ( ) ) ; } finally { monitor . removeController ( controller ) ; } if ( controller . getState ( ) != ServiceController . State . UP ) { throw SecurityLogger . ROOT_LOGGER . requiredSecurityDomainServiceNotAvailable ( controller . getName ( ) . getSimpleName ( ) ) ; }


signature:
public class VaultSession { /** * Method to compute masked password based on class attributes .
 * @ return masked password prefixed with { link @ PicketBoxSecurityVault . PASS _ MASK _ PREFIX } .
 * @ throws Exception */
private String computeMaskedPassword ( ) throws Exception { } }

implementation:
// Create the PBE secret key
SecretKeyFactory factory = SecretKeyFactory . getInstance ( VAULT_ENC_ALGORITHM ) ; char [ ] password = "somearbitrarycrazystringthatdoesnotmatter" . toCharArray ( ) ; PBEParameterSpec cipherSpec = new PBEParameterSpec ( salt . getBytes ( CHARSET ) , iterationCount ) ; PBEKeySpec keySpec = new PBEKeySpec ( password ) ; SecretKey cipherKey = factory . generateSecret ( keySpec ) ; String maskedPass = PBEUtils . encode64 ( keystorePassword . getBytes ( CHARSET ) , VAULT_ENC_ALGORITHM , cipherKey , cipherSpec ) ; return PicketBoxSecurityVault . PASS_MASK_PREFIX + maskedPass ;


signature:
public class VaultSession { /** * Initialize the underlying vault .
 * @ throws Exception */
private void initSecurityVault ( ) throws Exception { } }

implementation: try { this . vault = SecurityVaultFactory . get ( ) ; this . vault . init ( getVaultOptionsMap ( ) ) ; handshake ( ) ; } catch ( SecurityVaultException e ) { throw SecurityLogger . ROOT_LOGGER . securityVaultException ( e ) ; }


signature:
public class VaultSession { /** * Start the vault with given alias .
 * @ param vaultAlias
 * @ throws Exception */
public void startVaultSession ( String vaultAlias ) throws Exception { } }

implementation: if ( vaultAlias == null ) { throw SecurityLogger . ROOT_LOGGER . vaultAliasNotSpecified ( ) ; } this . keystoreMaskedPassword = ( org . jboss . security . Util . isPasswordCommand ( keystorePassword ) ) ? keystorePassword : computeMaskedPassword ( ) ; this . vaultAlias = vaultAlias ; initSecurityVault ( ) ;


signature:
public class VaultSession { /** * Add secured attribute to specified vault block . This method can be called only after successful
 * startVaultSession ( ) call .
 * @ param vaultBlock
 * @ param attributeName
 * @ param attributeValue
 * @ return secured attribute configuration */
public String addSecuredAttribute ( String vaultBlock , String attributeName , char [ ] attributeValue ) throws Exception { } }

implementation: vault . store ( vaultBlock , attributeName , attributeValue , null ) ; return securedAttributeConfigurationString ( vaultBlock , attributeName ) ;


signature:
public class VaultSession { /** * Add secured attribute to specified vault block . This method can be called only after successful
 * startVaultSession ( ) call .
 * After successful storage the secured attribute information will be displayed at standard output .
 * For silent method @ see addSecuredAttribute
 * @ param vaultBlock
 * @ param attributeName
 * @ param attributeValue
 * @ throws Exception */
public void addSecuredAttributeWithDisplay ( String vaultBlock , String attributeName , char [ ] attributeValue ) throws Exception { } }

implementation: vault . store ( vaultBlock , attributeName , attributeValue , null ) ; attributeCreatedDisplay ( vaultBlock , attributeName ) ;


signature:
public class VaultSession { /** * Check whether secured attribute is already set for given vault block and attribute name . This method can be called only after
 * successful startVaultSession ( ) call .
 * @ param vaultBlock
 * @ param attributeName
 * @ return true is password already exists for given vault block and attribute name .
 * @ throws Exception */
public boolean checkSecuredAttribute ( String vaultBlock , String attributeName ) throws Exception { } }

implementation: return vault . exists ( vaultBlock , attributeName ) ;


signature:
public class VaultSession { /** * This method removes secured attribute stored in { @ link SecurityVault } .
 * After successful remove operation returns true . Otherwise false .
 * @ param vaultBlock security vault block
 * @ param attributeName Attribute name stored in security vault
 * @ return true is operation is successful , otherwise false
 * @ throws Exception */
public boolean removeSecuredAttribute ( String vaultBlock , String attributeName ) throws Exception { } }

implementation: return vault . remove ( vaultBlock , attributeName , null ) ;


signature:
public class VaultSession { /** * Retrieves secured attribute from specified vault block with specified attribute name . This method can be called only after successful
 * startVaultSession ( ) call .
 * @ param vaultBlock security vault block
 * @ param attributeName Attribute name stored in security vault
 * @ return value of secured attribute if exists , otherwise null
 * @ throws Exception */
public char [ ] retrieveSecuredAttribute ( String vaultBlock , String attributeName ) throws Exception { } }

implementation: return vault . retrieve ( vaultBlock , attributeName , null ) ;


signature:
public class VaultSession { /** * Display info about stored secured attribute .
 * @ param vaultBlock
 * @ param attributeName */
private void attributeCreatedDisplay ( String vaultBlock , String attributeName ) { } }

implementation: System . out . println ( SecurityLogger . ROOT_LOGGER . vaultAttributeCreateDisplay ( vaultBlock , attributeName , securedAttributeConfigurationString ( vaultBlock , attributeName ) ) ) ;


signature:
public class VaultSession { /** * Display info about vault itself in form of AS7 configuration file . */
public void vaultConfigurationDisplay ( ) { } }

implementation: final String configuration = vaultConfiguration ( ) ; System . out . println ( SecurityLogger . ROOT_LOGGER . vaultConfigurationTitle ( ) ) ; System . out . println ( "********************************************" ) ; System . out . println ( "For standalone mode:" ) ; System . out . println ( configuration ) ; System . out . println ( "********************************************" ) ; System . out . println ( "For domain mode:" ) ; System . out . println ( "/host=the_host" + configuration ) ; System . out . println ( "********************************************" ) ;


signature:
public class VaultSession { /** * Returns vault configuration string in user readable form .
 * @ return */
public String vaultConfiguration ( ) { } }

implementation: StringBuilder sb = new StringBuilder ( ) ; sb . append ( "/core-service=vault:add(vault-options=[" ) ; sb . append ( "(\"KEYSTORE_URL\" => \"" ) . append ( keystoreURL ) . append ( "\")" ) . append ( "," ) ; sb . append ( "(\"KEYSTORE_PASSWORD\" => \"" ) . append ( keystoreMaskedPassword ) . append ( "\")" ) . append ( "," ) ; sb . append ( "(\"KEYSTORE_ALIAS\" => \"" ) . append ( vaultAlias ) . append ( "\")" ) . append ( "," ) ; sb . append ( "(\"SALT\" => \"" ) . append ( salt ) . append ( "\")" ) . append ( "," ) ; sb . append ( "(\"ITERATION_COUNT\" => \"" ) . append ( iterationCount ) . append ( "\")" ) . append ( "," ) ; sb . append ( "(\"ENC_FILE_DIR\" => \"" ) . append ( encryptionDirectory ) . append ( "\")" ) ; sb . append ( "])" ) ; return sb . toString ( ) ;


signature:
public class ViewBindingInjectionSource { /** * { @ inheritDoc } */
public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) { } }

implementation: serviceBuilder . addDependency ( serviceName , ComponentView . class , new ViewManagedReferenceFactory . Injector ( injector ) ) ;


signature:
public class ConnectorServices { /** * convenient method to check notNull of value
 * @ param < T > type of the value
 * @ param value the value
 * @ return the value or throw an { @ link IllegalStateException } if value is null ( a . k . a . service not started ) */
public static < T > T notNull ( T value ) { } }

implementation: if ( value == null ) throw ConnectorLogger . ROOT_LOGGER . serviceNotStarted ( ) ; return value ;


signature:
public class ConnectorServices { /** * resource - adapter DMR resource */
public static synchronized ServiceName getDeploymentServiceName ( final String raName , final Activation raxml ) { } }

implementation: if ( raName == null ) throw ConnectorLogger . ROOT_LOGGER . undefinedVar ( "RaName" ) ; ServiceName serviceName = null ; ModifiableResourceAdapter ra = ( ModifiableResourceAdapter ) raxml ; if ( ra != null && ra . getId ( ) != null ) { serviceName = getDeploymentServiceName ( raName , ra . getId ( ) ) ; } else { serviceName = getDeploymentServiceName ( raName , ( String ) null ) ; } ROOT_LOGGER . tracef ( "ConnectorServices: getDeploymentServiceName(%s,%s) -> %s" , raName , raxml , serviceName ) ; return serviceName ;


signature:
public class ConnectorServices { /** * Makes a note of the resource adapter identifier with which a resource adapter named < code > raName < / code > is registered in
 * the { @ link org . jboss . jca . core . spi . rar . ResourceAdapterRepository } .
 * Subsequent calls to { @ link # getRegisteredResourceAdapterIdentifier ( String ) } with the passed < code > raName < / code > return
 * the < code > raIdentifier < / code >
 * @ param raName The resource adapter name
 * @ param raIdentifier The resource adapter identifier */
public static void registerResourceAdapterIdentifier ( final String raName , final String raIdentifier ) { } }

implementation: synchronized ( resourceAdapterRepositoryIdentifiers ) { resourceAdapterRepositoryIdentifiers . put ( raName , raIdentifier ) ; }


signature:
public class ConstantAnalysis { /** * Insert the constant value into the argument Any . */
public void insertValue ( Any any ) { } }

implementation:
if ( type == String . class ) any . insert_wstring ( ( String ) value ) ; // 1.3.5.10 Map to wstring
else Util . insertAnyPrimitive ( any , value ) ;


signature:
public class RaXmlDeploymentProcessor { /** * Process a deployment for a Connector . Will install a { @ Code
 * JBossService } for this ResourceAdapter .
 * @ param phaseContext the deployment unit context
 * @ throws DeploymentUnitProcessingException */
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ManagementResourceRegistration baseRegistration = deploymentUnit . getAttachment ( DeploymentModelUtils . MUTABLE_REGISTRATION_ATTACHMENT ) ; final ManagementResourceRegistration registration ; final Resource deploymentResource = deploymentUnit . getAttachment ( DeploymentModelUtils . DEPLOYMENT_RESOURCE ) ; final ConnectorXmlDescriptor connectorXmlDescriptor = deploymentUnit . getAttachment ( ConnectorXmlDescriptor . ATTACHMENT_KEY ) ; final CapabilityServiceSupport support = deploymentUnit . getAttachment ( CAPABILITY_SERVICE_SUPPORT ) ; if ( connectorXmlDescriptor == null ) { return ; // Skip non ra deployments
} if ( deploymentUnit . getParent ( ) != null ) { registration = baseRegistration . getSubModel ( PathAddress . pathAddress ( PathElement . pathElement ( "subdeployment" ) ) ) ; } else { registration = baseRegistration ; } ResourceAdaptersService . ModifiableResourceAdaptors raxmls = null ; final ServiceController < ? > raService = phaseContext . getServiceRegistry ( ) . getService ( ConnectorServices . RESOURCEADAPTERS_SERVICE ) ; if ( raService != null ) raxmls = ( ( ResourceAdaptersService . ModifiableResourceAdaptors ) raService . getValue ( ) ) ; ROOT_LOGGER . tracef ( "processing Raxml" ) ; Module module = deploymentUnit . getAttachment ( Attachments . MODULE ) ; try { final ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; String deploymentUnitPrefix = "" ; if ( deploymentUnit . getParent ( ) != null ) { deploymentUnitPrefix = deploymentUnit . getParent ( ) . getName ( ) + "#" ; } final String deploymentUnitName = deploymentUnitPrefix + deploymentUnit . getName ( ) ; if ( raxmls != null ) { for ( Activation raxml : raxmls . getActivations ( ) ) { String rarName = raxml . getArchive ( ) ; if ( deploymentUnitName . equals ( rarName ) ) { RaServicesFactory . createDeploymentService ( registration , connectorXmlDescriptor , module , serviceTarget , deploymentUnitName , deploymentUnit . getServiceName ( ) , deploymentUnitName , raxml , deploymentResource , phaseContext . getServiceRegistry ( ) , support ) ; } } } // create service pointing to rar for other future activations
ServiceName serviceName = ConnectorServices . INACTIVE_RESOURCE_ADAPTER_SERVICE . append ( deploymentUnitName ) ; InactiveResourceAdapterDeploymentService service = new InactiveResourceAdapterDeploymentService ( connectorXmlDescriptor , module , deploymentUnitName , deploymentUnitName , deploymentUnit . getServiceName ( ) , registration , serviceTarget , deploymentResource ) ; ServiceBuilder builder = serviceTarget . addService ( serviceName , service ) ; builder . setInitialMode ( Mode . ACTIVE ) . install ( ) ; } catch ( Throwable t ) { throw new DeploymentUnitProcessingException ( t ) ; }


signature:
public class JndiPermission { /** * Determine if this permission implies the other permission .
 * @ param permission the other permission
 * @ return { @ code true } if this permission implies the other , { @ code false } if it does not or { @ code permission } is { @ code null } */
public boolean implies ( final JndiPermission permission ) { } }

implementation: return permission != null && ( ( actionBits & permission . actionBits ) == permission . actionBits ) && impliesPath ( permission . getName ( ) ) ;


signature:
public class JndiPermission { /** * Determine if this permission implies the given { @ code actionsBits } on the given { @ code name } .
 * @ param name the name ( must not be { @ code null } )
 * @ param actionBits the action bits
 * @ return { @ code true } if this permission implies the { @ code actionBits } on the { @ code name } , { @ code false } otherwise */
public boolean implies ( final String name , final int actionBits ) { } }

implementation: Assert . checkNotNullParam ( "name" , name ) ; final int maskedBits = actionBits & ACTION_ALL ; return ( this . actionBits & maskedBits ) == maskedBits && impliesPath ( name ) ;


signature:
public class JndiPermission { /** * Get the actions string . The actions string will be a canonical version of the one passed in at construction .
 * @ return the actions string ( not { @ code null } ) */
public String getActions ( ) { } }

implementation: final String actionString = this . actionString ; if ( actionString != null ) { return actionString ; } int actionBits = this . actionBits ; if ( actionBits == ACTION_ALL ) { return this . actionString = "*" ; } int m = Integer . lowestOneBit ( actionBits ) ; if ( m != 0 ) { StringBuilder b = new StringBuilder ( ) ; b . append ( getAction ( m ) ) ; actionBits &= ~ m ; while ( actionBits != 0 ) { m = Integer . lowestOneBit ( actionBits ) ; b . append ( ',' ) . append ( getAction ( m ) ) ; actionBits &= ~ m ; } return this . actionString = b . toString ( ) ; } else { return this . actionString = "" ; }


signature:
public class JndiPermission { /** * Return a permission which is equal to this one except with its actions reset to { @ code actionBits } . If the given
 * { @ code actionBits } equals the current bits of this permission , then this permission instance is returned ; otherwise
 * a new permission is constructed . Any action bits which fall outside of { @ link # ACTION _ ALL } are silently ignored .
 * @ param actionBits the action bits to use
 * @ return a permission with only the given action bits ( not { @ code null } ) */
public JndiPermission withNewActions ( int actionBits ) { } }

implementation: actionBits &= ACTION_ALL ; if ( actionBits == this . actionBits ) { return this ; } else { return new JndiPermission ( getName ( ) , actionBits ) ; }


signature:
public class JndiPermission { /** * private */
private boolean impliesPath0 ( final String yourName ) { } }

implementation:
// segment - by - segment comparison
final String myName = getName ( ) ; final Iterator < String > myIter = JndiPermissionNameParser . nameIterator ( myName ) ; final Iterator < String > yourIter = JndiPermissionNameParser . nameIterator ( yourName ) ; // even if it ' s just " " , there is always a first element
assert myIter . hasNext ( ) && yourIter . hasNext ( ) ; String myNext ; String yourNext ; for ( ; ; ) { myNext = myIter . next ( ) ; yourNext = yourIter . next ( ) ; if ( myNext . equals ( "-" ) ) { // " - " implies everything including " "
return true ; } if ( ! myNext . equals ( "*" ) && ! myNext . equals ( yourNext ) ) { // " foo / bar " does not imply " foo / baz "
return false ; } if ( myIter . hasNext ( ) ) { if ( ! yourIter . hasNext ( ) ) { // " foo / bar " does not imply " foo "
return false ; } } else { // if neither has next , " foo / bar " implies " foo / bar " , else " foo " does not imply " foo / bar "
return ! yourIter . hasNext ( ) ; } }


signature:
public class ServiceMBeanSupport { /** * Use the short class name as the default for the service name .
 * @ return a description of the mbean */
public String getName ( ) { } }

implementation: final String s = log . getName ( ) ; final int i = s . lastIndexOf ( "." ) ; return i != - 1 ? s . substring ( i + 1 , s . length ( ) ) : s ;


signature:
public class ServiceMBeanSupport { /** * Callback method of { @ link javax . management . MBeanRegistration } before the MBean is registered at the JMX Agent .
 * < b > Attention < / b > : Always call this method when you overwrite it in a subclass because it saves the Object Name of the
 * MBean .
 * @ param server Reference to the JMX Agent this MBean is registered on
 * @ param name Name specified by the creator of the MBean . Note that you can overwrite it when the given ObjectName is null
 * otherwise the change is discarded ( maybe a bug in JMX - RI ) .
 * @ return the ObjectName
 * @ throws Exception for any error */
public ObjectName preRegister ( MBeanServer server , ObjectName name ) throws Exception { } }

implementation: this . server = server ; serviceName = getObjectName ( server , name ) ; return serviceName ;


signature:
public class ServiceMBeanSupport { /** * Helper for sending out state change notifications */
private void sendStateChangeNotification ( int oldState , int newState , String msg , Throwable t ) { } }

implementation: long now = System . currentTimeMillis ( ) ; AttributeChangeNotification stateChangeNotification = new AttributeChangeNotification ( this , getNextNotificationSequenceNumber ( ) , now , msg , "State" , "java.lang.Integer" , new Integer ( oldState ) , new Integer ( newState ) ) ; stateChangeNotification . setUserData ( t ) ; sendNotification ( stateChangeNotification ) ;


signature:
public class ResourceAdapterSubsystemParser { /** * { @ inheritDoc } */
@ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { } }

implementation:
ModelNode node = context . getModelNode ( ) ; boolean hasChildren = node . hasDefined ( RESOURCEADAPTER_NAME ) && node . get ( RESOURCEADAPTER_NAME ) . asPropertyList ( ) . size ( ) > 0 ; context . startSubsystemElement ( Namespace . CURRENT . getUriString ( ) , ! hasChildren ) ; if ( hasChildren ) { writer . writeStartElement ( Element . RESOURCE_ADAPTERS . getLocalName ( ) ) ; ModelNode ras = node . get ( RESOURCEADAPTER_NAME ) ; for ( String name : ras . keys ( ) ) { final ModelNode ra = ras . get ( name ) ; writeRaElement ( writer , ra , name ) ; } writer . writeEndElement ( ) ; // Close the subsystem element
writer . writeEndElement ( ) ; }


signature:
public class JPAIdentityStoreService { /** * < p > Returns an { @ link javax . persistence . EntityManager } associated with the actual { @ link javax . transaction . Transaction } , if present . < / p >
 * < p > If { @ link javax . transaction . Transaction } is { @ link Status # STATUS _ ACTIVE } , this method tries to return an entity manager
 * already associated with it . If there is no entity manager a new one is created . < / p >
 * < p > This method is specially useful when IDM is being called from an EJB or any other component that have already started
 * a transaction . In this case , the client code is responsible to commit or rollback the transaction accordingly . < / p >
 * < p > The returned { @ link EntityManager } is always closed before the transaction completes . < / p >
 * @ param transactionManager The transaction manager .
 * @ return The { @ link EntityManager } associated with the actual transaction or null if there is no active transactions . */
private EntityManager getOrCreateTransactionalEntityManager ( TransactionManager transactionManager ) { } }

implementation: try { if ( transactionManager . getStatus ( ) == Status . STATUS_ACTIVE ) { EntityManager entityManager = this . transactionalEntityManagerHelper . getTransactionScopedEntityManager ( getPersistenceUnitName ( ) ) ; if ( entityManager == null ) { entityManager = createEntityManager ( transactionManager ) ; this . transactionalEntityManagerHelper . putEntityManagerInTransactionRegistry ( getPersistenceUnitName ( ) , entityManager ) ; } return entityManager ; } } catch ( Exception e ) { throw ROOT_LOGGER . idmJpaFailedCreateTransactionEntityManager ( e ) ; } return null ;


signature:
public class RaDeploymentParsingProcessor { /** * Process a deployment for standard ra deployment files . Will parse the xml
 * file and attach a configuration discovered during processing .
 * @ param phaseContext the deployment unit context
 * @ throws DeploymentUnitProcessingException */
@ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation: final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ResourceRoot deploymentRoot = deploymentUnit . getAttachment ( Attachments . DEPLOYMENT_ROOT ) ; final boolean resolveProperties = Util . shouldResolveSpec ( deploymentUnit ) ; final VirtualFile file = deploymentRoot . getRoot ( ) ; if ( file == null || ! file . exists ( ) ) return ; final String deploymentRootName = file . getName ( ) . toLowerCase ( Locale . ENGLISH ) ; if ( ! deploymentRootName . endsWith ( ".rar" ) ) { return ; } final VirtualFile alternateDescriptor = deploymentRoot . getAttachment ( org . jboss . as . ee . structure . Attachments . ALTERNATE_CONNECTOR_DEPLOYMENT_DESCRIPTOR ) ; String prefix = "" ; if ( deploymentUnit . getParent ( ) != null ) { prefix = deploymentUnit . getParent ( ) . getName ( ) + "#" ; } String deploymentName = prefix + file . getName ( ) ; ConnectorXmlDescriptor xmlDescriptor = process ( resolveProperties , file , alternateDescriptor , deploymentName ) ; phaseContext . getDeploymentUnit ( ) . putAttachment ( ConnectorXmlDescriptor . ATTACHMENT_KEY , xmlDescriptor ) ;


signature:
public class JaxrsScanningProcessor { /** * If any servlet / filter classes are declared , then we probably don ' t want to scan . */
protected boolean hasBootClasses ( JBossWebMetaData webdata ) throws DeploymentUnitProcessingException { } }

implementation: if ( webdata . getServlets ( ) != null ) { for ( ServletMetaData servlet : webdata . getServlets ( ) ) { String servletClass = servlet . getServletClass ( ) ; if ( BOOT_CLASSES . contains ( servletClass ) ) return true ; } } if ( webdata . getFilters ( ) != null ) { for ( FilterMetaData filter : webdata . getFilters ( ) ) { if ( BOOT_CLASSES . contains ( filter . getFilterClass ( ) ) ) return true ; } } return false ;


signature:
public class ProxyInvocationHandler { /** * { @ inheritDoc } */
public Object invoke ( final Object proxy , final Method method , final Object [ ] args ) throws Throwable { } }

implementation:
final Interceptor interceptor = interceptors . get ( method ) ; if ( interceptor == null ) { throw new NoSuchMethodError ( method . toString ( ) ) ; } final InterceptorContext context = new InterceptorContext ( ) ; // special location for original proxy
context . putPrivateData ( Object . class , proxy ) ; context . putPrivateData ( Component . class , componentView . getComponent ( ) ) ; context . putPrivateData ( ComponentView . class , componentView ) ; context . putPrivateData ( SecurityDomain . class , WildFlySecurityManager . isChecking ( ) ? AccessController . doPrivileged ( ( PrivilegedAction < SecurityDomain > ) SecurityDomain :: getCurrent ) : SecurityDomain . getCurrent ( ) ) ; instance . prepareInterceptorContext ( context ) ; context . setParameters ( args ) ; context . setMethod ( method ) ; // setup the public context data
context . setContextData ( new HashMap < String , Object > ( ) ) ; context . setBlockingCaller ( true ) ; return interceptor . processInvocation ( context ) ;


signature:
public class RemoteToCorba { /** * Returns the CORBA object for a Remote object .
 * If input is not a Remote object , or if Remote object uses JRMP , return null .
 * If the RMI - IIOP library is not available , throw ConfigurationException .
 * @ param orig The object to turn into a CORBA object . If not Remote ,
 * or if is a JRMP stub or impl , return null .
 * @ param name Ignored
 * @ param ctx The non - null CNCtx whose ORB to use .
 * @ param env Ignored
 * @ return The CORBA object for < tt > orig < / tt > or null .
 * @ throws javax . naming . ConfigurationException If the CORBA object cannot be obtained
 * due to configuration problems , for instance , if RMI - IIOP not available .
 * @ throws NamingException If some other problem prevented a CORBA
 * object from being obtained from the Remote object . */
public Object getStateToBind ( Object orig , Name name , Context ctx , Hashtable < ? , ? > env ) throws NamingException { } }

implementation:
if ( orig instanceof org . omg . CORBA . Object ) { // Already a CORBA object , just use it
return null ; } if ( orig instanceof Remote ) { // Turn remote object into org . omg . CORBA . Object
try { // Returns null if JRMP ; let next factory try
// CNCtx will eventually throw IllegalArgumentException if
// no CORBA object gotten
return CorbaUtils . remoteToCorba ( ( Remote ) orig , ( ( CNCtx ) ctx ) . _orb ) ; } catch ( ClassNotFoundException e ) { // RMI - IIOP library not available
throw IIOPLogger . ROOT_LOGGER . unavailableRMIPackages ( ) ; } } return null ; // pass and let next state factory try


signature:
public class ValueConfig { /** * Get value .
 * @ param type the type
 * @ return value */
public Object getValue ( Type type ) { } }

implementation: if ( type == null || ( type instanceof Class ) ) { return getClassValue ( ( Class ) type ) ; } else if ( type instanceof ParameterizedType ) { ParameterizedType pt = ( ParameterizedType ) type ; return getPtValue ( pt ) ; } else { throw PojoLogger . ROOT_LOGGER . unknownType ( type ) ; }


signature:
public class ComponentDescription { /** * Get the context service name .
 * @ return the context service name */
public ServiceName getContextServiceName ( ) { } }

implementation: if ( contextServiceName != null ) return contextServiceName ; if ( getNamingMode ( ) == ComponentNamingMode . CREATE ) { return ContextNames . contextServiceNameOfComponent ( getApplicationName ( ) , getModuleName ( ) , getComponentName ( ) ) ; } else if ( getNamingMode ( ) == ComponentNamingMode . USE_MODULE ) { return ContextNames . contextServiceNameOfModule ( getApplicationName ( ) , getModuleName ( ) ) ; } else { throw new IllegalStateException ( ) ; }


signature:
public class ComponentDescription { /** * Returns a combined map of class and method level interceptors
 * @ return all interceptors on the class */
public Set < InterceptorDescription > getAllInterceptors ( ) { } }

implementation: if ( allInterceptors == null ) { allInterceptors = new HashSet < InterceptorDescription > ( ) ; allInterceptors . addAll ( classInterceptors ) ; if ( ! excludeDefaultInterceptors ) { allInterceptors . addAll ( defaultInterceptors ) ; } for ( List < InterceptorDescription > interceptors : methodInterceptors . values ( ) ) { allInterceptors . addAll ( interceptors ) ; } } return allInterceptors ;


signature:
public class ComponentDescription { /** * Returns the { @ link InterceptorDescription } for the passed < code > interceptorClassName < / code > , if such a class
 * interceptor exists for this component description . Else returns null .
 * @ param interceptorClassName The fully qualified interceptor class name
 * @ return */
public InterceptorDescription getClassInterceptor ( String interceptorClassName ) { } }

implementation: for ( InterceptorDescription interceptor : classInterceptors ) { if ( interceptor . getInterceptorClassName ( ) . equals ( interceptorClassName ) ) { return interceptor ; } } return null ;


signature:
public class ComponentDescription { /** * Add a method interceptor class name .
 * @ param method the method
 * @ param description the interceptor descriptor */
public void addMethodInterceptor ( MethodIdentifier method , InterceptorDescription description ) { } }

implementation:
// we do not add method level interceptors to the set of interceptor classes ,
// as their around invoke annotations
List < InterceptorDescription > interceptors = methodInterceptors . get ( method ) ; if ( interceptors == null ) { methodInterceptors . put ( method , interceptors = new ArrayList < InterceptorDescription > ( ) ) ; } final String name = description . getInterceptorClassName ( ) ; // add the interceptor class to the EEModuleDescription
interceptors . add ( description ) ; this . allInterceptors = null ;


signature:
public class ComponentDescription { /** * Sets the method level interceptors for a method , and marks it as exclude class and default level interceptors .
 * This is used to set the final interceptor order after it has been modifier by the deployment descriptor
 * @ param identifier the method identifier
 * @ param interceptorDescriptions The interceptors */
public void setMethodInterceptors ( MethodIdentifier identifier , List < InterceptorDescription > interceptorDescriptions ) { } }

implementation: methodInterceptors . put ( identifier , interceptorDescriptions ) ; methodExcludeClassInterceptors . add ( identifier ) ; methodExcludeDefaultInterceptors . add ( identifier ) ;


signature:
public class ComponentDescription { /** * Adds an interceptor class method override , merging it with existing overrides ( if any )
 * @ param className The class name
 * @ param override The method override */
public void addInterceptorMethodOverride ( final String className , final InterceptorClassDescription override ) { } }

implementation: interceptorClassOverrides . put ( className , InterceptorClassDescription . merge ( interceptorClassOverrides . get ( className ) , override ) ) ;


signature:
public class ComponentDescription { /** * Set the naming mode of this component . May not be { @ code null } .
 * @ param namingMode the naming mode */
public void setNamingMode ( final ComponentNamingMode namingMode ) { } }

implementation: if ( namingMode == null ) { throw EeLogger . ROOT_LOGGER . nullVar ( "namingMode" , "component" , componentName ) ; } this . namingMode = namingMode ;


signature:
public class ComponentDescription { /** * Add a dependency to this component . If the same dependency is added multiple times , only the first will
 * take effect .
 * @ param serviceName the service name of the dependency */
public void addDependency ( ServiceName serviceName ) { } }

implementation: if ( serviceName == null ) { throw EeLogger . ROOT_LOGGER . nullVar ( "serviceName" , "component" , componentName ) ; } dependencies . add ( serviceName ) ;


signature:
public class ComponentConfiguration { /** * Gets the interceptor list for a given method . This should not be called until
 * all interceptors have been added .
 * @ param method the component method
 * @ return the deque */
public List < InterceptorFactory > getComponentInterceptors ( Method method ) { } }

implementation: Map < Method , OrderedItemContainer < List < InterceptorFactory > > > map = componentInterceptors ; OrderedItemContainer < List < InterceptorFactory > > interceptors = map . get ( method ) ; if ( interceptors == null ) { return Collections . emptyList ( ) ; } List < List < InterceptorFactory > > sortedItems = interceptors . getSortedItems ( ) ; List < InterceptorFactory > ret = new ArrayList < > ( ) ; for ( List < InterceptorFactory > item : sortedItems ) { ret . addAll ( item ) ; } return ret ;


signature:
public class ComponentConfiguration { /** * Gets the around timeout interceptor list for a given method . This should not be called until
 * all interceptors have been added .
 * @ param method the component method
 * @ return the deque */
public List < InterceptorFactory > getAroundTimeoutInterceptors ( Method method ) { } }

implementation: Map < Method , OrderedItemContainer < InterceptorFactory > > map = timeoutInterceptors ; OrderedItemContainer < InterceptorFactory > interceptors = map . get ( method ) ; if ( interceptors == null ) { return Collections . emptyList ( ) ; } return interceptors . getSortedItems ( ) ;


signature:
public class ComponentConfiguration { /** * Adds an interceptor factory to every method on the component .
 * @ param factory The interceptor factory to add
 * @ param priority The interceptors relative order
 * @ param publicOnly If true then then interceptor is only added to public methods */
public void addComponentInterceptor ( InterceptorFactory factory , int priority , boolean publicOnly ) { } }

implementation: addComponentInterceptors ( Collections . singletonList ( factory ) , priority , publicOnly ) ;