signature:
public class JMSDestinationDefinitionInjectionSource { /** * To workaround ActiveMQ ' s BindingRegistry limitation in { @ link WildFlyBindingRegistry }
 * that does not allow to build a BindingInfo with the ResolutionContext info , the JMS queue is created * without * any
 * JNDI bindings and handle the JNDI bindings directly by getting the service ' s JMS queue . */
private void startQueue ( final String queueName , final ServiceTarget serviceTarget , final ServiceName serverServiceName , final ServiceBuilder < ? > serviceBuilder , final DeploymentUnit deploymentUnit , final Injector < ManagedReferenceFactory > injector , final boolean external ) { } }

implementation:
final String selector = properties . containsKey ( SELECTOR . getName ( ) ) ? properties . get ( SELECTOR . getName ( ) ) : null ; final boolean durable = properties . containsKey ( DURABLE . getName ( ) ) ? Boolean . valueOf ( properties . get ( DURABLE . getName ( ) ) ) : DURABLE . getDefaultValue ( ) . asBoolean ( ) ; final String managementAddress = properties . containsKey ( MANAGEMENT_ADDRESS . getName ( ) ) ? properties . get ( MANAGEMENT_ADDRESS . getName ( ) ) : MANAGEMENT_ADDRESS . getDefaultValue ( ) . asString ( ) ; final String user = properties . containsKey ( "management-user" ) ? properties . get ( "management-user" ) : null ; final String password = properties . containsKey ( "management-password" ) ? properties . get ( "\"management-password" ) : null ; ModelNode destination = new ModelNode ( ) ; destination . get ( NAME ) . set ( queueName ) ; destination . get ( DURABLE . getName ( ) ) . set ( durable ) ; if ( selector != null ) { destination . get ( SELECTOR . getName ( ) ) . set ( selector ) ; } destination . get ( ENTRIES ) . add ( jndiName ) ; Service < Queue > queueService ; if ( external ) { ServiceName pcfName = JMSServices . getPooledConnectionFactoryBaseServiceName ( serverServiceName ) . append ( resourceAdapter ) ; final ServiceName jmsQueueServiceName = JMSServices . getJmsQueueBaseServiceName ( serverServiceName ) . append ( queueName ) ; queueService = ExternalJMSQueueService . installRuntimeQueueService ( DestinationConfiguration . Builder . getInstance ( ) . setResourceAdapter ( resourceAdapter ) . setName ( queueName ) . setManagementQueueAddress ( managementAddress ) . setDestinationServiceName ( jmsQueueServiceName ) . setDurable ( durable ) . setSelector ( selector ) . setManagementUsername ( user ) . setManagementPassword ( password ) . build ( ) , serviceTarget , pcfName ) ; } else { queueService = JMSQueueService . installService ( queueName , serviceTarget , serverServiceName , selector , durable ) ; } inject ( serviceBuilder , injector , queueService ) ; // create the management registration
String serverName = null ; final DeploymentResourceSupport deploymentResourceSupport = deploymentUnit . getAttachment ( Attachments . DEPLOYMENT_RESOURCE_SUPPORT ) ; PathAddress registration ; if ( external ) { final PathElement dest = PathElement . pathElement ( EXTERNAL_JMS_QUEUE , queueName ) ; deploymentResourceSupport . getDeploymentSubsystemModel ( MessagingExtension . SUBSYSTEM_NAME ) ; registration = PathAddress . pathAddress ( dest ) ; } else { serverName = getActiveMQServerName ( properties ) ; final PathElement dest = PathElement . pathElement ( JMS_QUEUE , queueName ) ; final PathElement serverElement = PathElement . pathElement ( SERVER , serverName ) ; deploymentResourceSupport . getDeploymentSubModel ( MessagingExtension . SUBSYSTEM_NAME , serverElement ) ; registration = PathAddress . pathAddress ( serverElement , dest ) ; } MessagingXmlInstallDeploymentUnitProcessor . createDeploymentSubModel ( registration , deploymentUnit ) ; JMSQueueConfigurationRuntimeHandler . INSTANCE . registerResource ( serverName , queueName , destination ) ;


signature:
public class RmiIdlUtil { /** * checks if the method ' s throws clause includes java . rmi . RemoteException
 * or a superclass of it . */
public static boolean throwsRemoteException ( Method method ) { } }

implementation: Class [ ] exception = method . getExceptionTypes ( ) ; for ( int i = 0 ; i < exception . length ; ++ i ) if ( exception [ i ] . isAssignableFrom ( java . rmi . RemoteException . class ) ) return true ; return false ;


signature:
public class RmiIdlUtil { /** * Checks whether all the fields in the class are declared as public . */
public static boolean isAllFieldsPublic ( Class c ) { } }

implementation: try { final Field [ ] list = c . getFields ( ) ; for ( int i = 0 ; i < list . length ; i ++ ) if ( ! Modifier . isPublic ( list [ i ] . getModifiers ( ) ) ) return false ; } catch ( Exception e ) { return false ; } return true ;


signature:
public class InterfaceDefImpl { /** * LocalIRObject implementation - - - - - */
public IRObject getReference ( ) { } }

implementation: if ( ref == null ) { ref = org . omg . CORBA . InterfaceDefHelper . narrow ( servantToReference ( new InterfaceDefPOATie ( this ) ) ) ; } return ref ;


signature:
public class InterfaceDefImpl { /** * ContainerOperations implementation - - - - - */
public Contained lookup ( String search_name ) { } }

implementation: Contained res = delegate . lookup ( search_name ) ; return res ;


signature:
public class InterfaceDefImpl { /** * InterfaceDefOperations implementation - - - - - */
public InterfaceDef [ ] base_interfaces ( ) { } }

implementation: if ( base_interfaces_ref == null ) { base_interfaces_ref = new InterfaceDef [ base_interfaces . length ] ; for ( int i = 0 ; i < base_interfaces_ref . length ; ++ i ) { Contained c = repository . lookup_id ( base_interfaces [ i ] ) ; base_interfaces_ref [ i ] = InterfaceDefHelper . narrow ( c ) ; } } return base_interfaces_ref ;


signature:
public class InterfaceDefImpl { /** * IDLTypeOperations implementation - - - - - */
public TypeCode type ( ) { } }

implementation: if ( typeCode == null ) typeCode = getORB ( ) . create_interface_tc ( id , name ) ; return typeCode ;


signature:
public class InterfaceDefImpl { /** * ContainedImpl implementation - - - - - */
public Description describe ( ) { } }

implementation: String defined_in_id = "IR" ; if ( defined_in instanceof org . omg . CORBA . ContainedOperations ) defined_in_id = ( ( org . omg . CORBA . ContainedOperations ) defined_in ) . id ( ) ; org . omg . CORBA . InterfaceDescription md = new InterfaceDescription ( name , id , defined_in_id , version , base_interfaces , false ) ; Any any = getORB ( ) . create_any ( ) ; InterfaceDescriptionHelper . insert ( any , md ) ; return new Description ( DefinitionKind . dk_Interface , any ) ;


signature:
public class UrlUtil { /** * Decode a URI string ( according to RFC 2396 ) . */
public static String decode ( String s ) throws MalformedURLException { } }

implementation:
try { return decode ( s , "8859_1" ) ; } catch ( UnsupportedEncodingException e ) { // ISO - Latin - 1 should always be available ?
throw IIOPLogger . ROOT_LOGGER . unavailableISOLatin1Decoder ( ) ; }


signature:
public class UrlUtil { /** * Decode a URI string ( according to RFC 2396 ) .
 * Three - character sequences ' % xy ' , where ' xy ' is the two - digit
 * hexadecimal representation of the lower 8 - bits of a character ,
 * are decoded into the character itself .
 * The string is subsequently converted using the specified encoding */
public static String decode ( String s , String enc ) throws MalformedURLException , UnsupportedEncodingException { } }

implementation:
int length = s . length ( ) ; byte [ ] bytes = new byte [ length ] ; int j = 0 ; for ( int i = 0 ; i < length ; i ++ ) { if ( s . charAt ( i ) == '%' ) { i ++ ; // skip %
try { bytes [ j ++ ] = ( byte ) Integer . parseInt ( s . substring ( i , i + 2 ) , 16 ) ; } catch ( Exception e ) { throw IIOPLogger . ROOT_LOGGER . invalidURIEncoding ( s ) ; } i ++ ; // skip first hex char ; for loop will skip second one
} else { bytes [ j ++ ] = ( byte ) s . charAt ( i ) ; } } return new String ( bytes , 0 , j , enc ) ;


signature:
public class UrlUtil { /** * Encode a string for inclusion in a URI ( according to RFC 2396 ) .
 * Unsafe characters are escaped by encoding them in three - character
 * sequences ' % xy ' , where ' xy ' is the two - digit hexadecimal representation
 * of the lower 8 - bits of the character .
 * The question mark ' ? ' character is also escaped , as required by RFC 2255.
 * The string is first converted to the specified encoding .
 * For LDAP ( 2255 ) , the encoding must be UTF - 8. */
public static String encode ( String s , String enc ) throws UnsupportedEncodingException { } }


signature:
public class AbstractDeploymentModelBuilder { /** * @ see org . jboss . webservices . integration . deployers . deployment . DeploymentModelBuilder # newDeploymentModel ( DeploymentUnit )
 * @ param unit deployment unit */
public final void newDeploymentModel ( final DeploymentUnit unit ) { } }

implementation: final ArchiveDeployment dep ; if ( unit . hasAttachment ( DEPLOYMENT_KEY ) ) { dep = ( ArchiveDeployment ) unit . getAttachment ( DEPLOYMENT_KEY ) ; } else { dep = newDeployment ( unit ) ; propagateAttachments ( unit , dep ) ; } this . build ( dep , unit ) ;


signature:
public class AbstractDeploymentModelBuilder { /** * Creates new Http Web Service endpoint .
 * @ param endpointClass endpoint class name
 * @ param endpointName endpoint name
 * @ param dep deployment
 * @ return WS endpoint */
protected final Endpoint newHttpEndpoint ( final String endpointClass , final String endpointName , final Deployment dep ) { } }

implementation: if ( endpointName == null ) throw WSLogger . ROOT_LOGGER . nullEndpointName ( ) ; if ( endpointClass == null ) throw WSLogger . ROOT_LOGGER . nullEndpointClass ( ) ; final Endpoint endpoint = this . deploymentModelFactory . newHttpEndpoint ( endpointClass ) ; endpoint . setShortName ( endpointName ) ; endpoint . setType ( endpointType ) ; dep . getService ( ) . addEndpoint ( endpoint ) ; return endpoint ;


signature:
public class AbstractDeploymentModelBuilder { /** * Creates new Web Service deployment .
 * @ param unit deployment unit
 * @ return archive deployment */
private ArchiveDeployment newDeployment ( final DeploymentUnit unit ) { } }

implementation:
WSLogger . ROOT_LOGGER . tracef ( "Creating new unified WS deployment model for %s" , unit ) ; final ResourceRoot deploymentRoot = unit . getAttachment ( Attachments . DEPLOYMENT_ROOT ) ; final VirtualFile root = deploymentRoot != null ? deploymentRoot . getRoot ( ) : null ; final ClassLoader classLoader ; final Module module = unit . getAttachment ( Attachments . MODULE ) ; if ( module == null ) { classLoader = unit . getAttachment ( CLASSLOADER_KEY ) ; if ( classLoader == null ) { throw WSLogger . ROOT_LOGGER . classLoaderResolutionFailed ( unit ) ; } } else { classLoader = module . getClassLoader ( ) ; } ArchiveDeployment parentDep = null ; if ( unit . getParent ( ) != null ) { final Module parentModule = unit . getParent ( ) . getAttachment ( Attachments . MODULE ) ; if ( parentModule == null ) { throw WSLogger . ROOT_LOGGER . classLoaderResolutionFailed ( deploymentRoot ) ; } WSLogger . ROOT_LOGGER . tracef ( "Creating new unified WS deployment model for %s" , unit . getParent ( ) ) ; parentDep = this . newDeployment ( null , unit . getParent ( ) . getName ( ) , parentModule . getClassLoader ( ) , null ) ; } final UnifiedVirtualFile uvf = root != null ? new VirtualFileAdaptor ( root ) : new ResourceLoaderAdapter ( classLoader ) ; final ArchiveDeployment dep = this . newDeployment ( parentDep , unit . getName ( ) , classLoader , uvf ) ; // add an AnnotationInfo attachment that uses composite jandex index
dep . addAttachment ( AnnotationsInfo . class , new JandexAnnotationsInfo ( unit ) ) ; return dep ;


signature:
public class ElytronSASClientInterceptor { /** * Build an { @ link URI } using the information extracted from the specified { @ link ClientRequestInfo } . The format of
 * the URI built by this method is " iiop : / / hostname : port " .
 * @ param clientRequestInfo the { @ link ClientRequestInfo } used to obtain the target information necessary to build
 * the { @ link URI } .
 * @ return the constructed { @ link URI } instance .
 * @ throws URISyntaxException if a syntax error is found when building the { @ link URI } . */
private URI getURI ( final ClientRequestInfo clientRequestInfo ) throws URISyntaxException { } }

implementation: final StringBuilder builder = new StringBuilder ( "iiop:" ) ; if ( clientRequestInfo instanceof ClientRequestInfoImpl ) { ClientRequestInfoImpl infoImpl = ( ClientRequestInfoImpl ) clientRequestInfo ; CorbaConnection connection = ( CorbaConnection ) infoImpl . connection ( ) ; if ( connection == null ) { return null ; } ContactInfo info = connection . getContactInfo ( ) ; if ( info instanceof SocketOrChannelContactInfoImpl ) { String hostname = ( ( SocketOrChannelContactInfoImpl ) info ) . getHost ( ) ; if ( hostname != null ) builder . append ( "//" ) . append ( hostname ) ; int port = ( ( SocketOrChannelContactInfoImpl ) info ) . getPort ( ) ; if ( port > 0 ) builder . append ( ":" ) . append ( port ) ; } } else { return null ; } return new URI ( builder . toString ( ) ) ;


signature:
public class ElytronSASClientInterceptor { /** * Create an encoded { @ link InitialContextToken } with an username / password pair obtained from an Elytron client configuration
 * matched by the specified { @ link URI } .
 * @ param uri the target { @ link URI } .
 * @ param secMech a reference to the { @ link CompoundSecMech } that was found in the { @ link ClientRequestInfo } .
 * @ return the encoded { @ link InitialContextToken } , if a valid username is obtained from the matched configuration ;
 * an empty { @ code byte [ ] } otherwise ;
 * @ throws Exception if an error occurs while building the encoded { @ link InitialContextToken } . */
private byte [ ] createInitialContextToken ( final URI uri , final CompoundSecMech secMech ) throws Exception { } }

implementation:
AuthenticationContext authContext = this . authContext == null ? AuthenticationContext . captureCurrent ( ) : this . authContext ; // obtain the configuration that matches the URI .
final AuthenticationConfiguration configuration = AUTH_CONFIG_CLIENT . getAuthenticationConfiguration ( uri , authContext , - 1 , null , null ) ; // get the callback handler from the configuration and use it to obtain a username / password pair .
final CallbackHandler handler = AUTH_CONFIG_CLIENT . getCallbackHandler ( configuration ) ; final NameCallback nameCallback = new NameCallback ( "Username: " ) ; final PasswordCallback passwordCallback = new PasswordCallback ( "Password: " , false ) ; try { handler . handle ( new Callback [ ] { nameCallback , passwordCallback } ) ; } catch ( UnsupportedCallbackException e ) { return NO_AUTHENTICATION_TOKEN ; } // if the name callback contains a valid username we create the initial context token .
if ( nameCallback . getName ( ) != null && ! nameCallback . getName ( ) . equals ( AnonymousPrincipal . getInstance ( ) . getName ( ) ) ) { byte [ ] encodedTargetName = secMech . as_context_mech . target_name ; String name = nameCallback . getName ( ) ; if ( name . indexOf ( '@' ) < 0 ) { byte [ ] decodedTargetName = CSIv2Util . decodeGssExportedName ( encodedTargetName ) ; String targetName = new String ( decodedTargetName , StandardCharsets . UTF_8 ) ; name += "@" + targetName ; // " @ default "
} byte [ ] username = name . getBytes ( StandardCharsets . UTF_8 ) ; byte [ ] password = { } ; if ( passwordCallback . getPassword ( ) != null ) password = new String ( passwordCallback . getPassword ( ) ) . getBytes ( StandardCharsets . UTF_8 ) ; // create the initial context token and ASN . 1 - encode it , as defined in RFC 2743.
InitialContextToken authenticationToken = new InitialContextToken ( username , password , encodedTargetName ) ; return CSIv2Util . encodeInitialContextToken ( authenticationToken , codec ) ; } return NO_AUTHENTICATION_TOKEN ;


signature:
public class JaxrsDeploymentMarker { /** * JAX - RS annotations are found in the deployment , especially if it ' s an EAR one ) */
public static boolean isJaxrsDeployment ( DeploymentUnit deploymentUnit ) { } }

implementation: DeploymentUnit deployment = deploymentUnit . getParent ( ) == null ? deploymentUnit : deploymentUnit . getParent ( ) ; Boolean val = deployment . getAttachment ( ATTACHMENT_KEY ) ; return val != null && val ;


signature:
public class TimerImpl { /** * { @ inheritDoc } */
@ Override public void cancel ( ) throws IllegalStateException , EJBException { } }

implementation: try { timerService . cancelTimer ( this ) ; } catch ( InterruptedException e ) { throw new EJBException ( e ) ; }


signature:
public class TimerImpl { /** * { @ inheritDoc }
 * @ see # getTimerHandle ( ) */
@ Override public TimerHandle getHandle ( ) throws IllegalStateException , EJBException { } }

implementation:
// make sure it ' s in correct state
this . assertTimerState ( ) ; // for non - persistent timers throws an exception ( mandated by EJB3 spec )
if ( this . persistent == false ) { throw EjbLogger . EJB3_TIMER_LOGGER . invalidTimerHandlersForPersistentTimers ( "EJB3.1 Spec 18.2.6" ) ; } return this . handle ;


signature:
public class TimerImpl { /** * { @ inheritDoc }
 * @ see # getNextExpiration ( ) */
@ Override public Date getNextTimeout ( ) throws IllegalStateException , EJBException { } }

implementation:
// first check the validity of the timer state
this . assertTimerState ( ) ; if ( this . nextExpiration == null ) { throw EjbLogger . EJB3_TIMER_LOGGER . noMoreTimeoutForTimer ( this ) ; } return this . nextExpiration ;


signature:
public class TimerImpl { /** * Sets the next timeout of this timer
 * @ param next The next scheduled timeout of this timer */
public void setNextTimeout ( Date next ) { } }

implementation: if ( next == null ) { setTimerState ( TimerState . EXPIRED , null ) ; } this . nextExpiration = next ;


signature:
public class TimerImpl { /** * { @ inheritDoc } */
@ Override public long getTimeRemaining ( ) throws IllegalStateException , EJBException { } }

implementation:
// TODO : Rethink this implementation
// first check the validity of the timer state
this . assertTimerState ( ) ; if ( this . nextExpiration == null ) { throw EjbLogger . EJB3_TIMER_LOGGER . noMoreTimeoutForTimer ( this ) ; } long currentTimeInMillis = System . currentTimeMillis ( ) ; long nextTimeoutInMillis = this . nextExpiration . getTime ( ) ; // if the next expiration is * not * in future and the repeat interval isn ' t
// a positive number ( i . e . no repeats ) then there won ' t be any more timeouts .
// So throw a NoMoreTimeoutsException .
// NOTE : We check for intervalDuration and not just nextExpiration because ,
// it ' s a valid case where the nextExpiration is in past ( maybe the server was
// down when the timeout was expected )
// if ( nextTimeoutInMillis < currentTimeInMillis & & this . intervalDuration < = 0)
// throw new NoMoreTimeoutsException ( " No more timeouts for timer " + this ) ;
return nextTimeoutInMillis - currentTimeInMillis ;


signature:
public class TimerImpl { /** * Returns true if this timer is active . Else returns false .
 * A timer is considered to be " active " , if its { @ link TimerState }
 * is neither of the following :
 * < ul >
 * < li > { @ link TimerState # CANCELED } < / li >
 * < li > { @ link TimerState # EXPIRED } < / li >
 * < li > has not been suspended < / li >
 * < / ul >
 * And if the corresponding timer service is still up
 * @ return */
public boolean isActive ( ) { } }

implementation: return timerService . isStarted ( ) && ! isCanceled ( ) && ! isExpired ( ) && ( timerService . isScheduled ( getId ( ) ) || timerState == TimerState . CREATED ) ;


signature:
public class TimerImpl { /** * Asserts that the timer is < i > not < / i > in any of the following states :
 * < ul >
 * < li > { @ link TimerState # CANCELED } < / li >
 * < li > { @ link TimerState # EXPIRED } < / li >
 * < / ul >
 * @ throws javax . ejb . NoSuchObjectLocalException if the txtimer was canceled or has expired */
protected void assertTimerState ( ) { } }

implementation: if ( timerState == TimerState . EXPIRED ) throw EjbLogger . EJB3_TIMER_LOGGER . timerHasExpired ( ) ; if ( timerState == TimerState . CANCELED ) throw EjbLogger . EJB3_TIMER_LOGGER . timerWasCanceled ( ) ; AllowedMethodsInformation . checkAllowed ( MethodType . TIMER_SERVICE_METHOD ) ;


signature:
public class TimerImpl { /** * Sets the state and timer task executing thread of this timer
 * @ param state The state of this timer
 * @ param thread The executing thread which is processing the timeout task */
protected void setTimerState ( TimerState state , Thread thread ) { } }

implementation: assert ( ( state == TimerState . IN_TIMEOUT || state == TimerState . RETRY_TIMEOUT ) && thread != null ) || thread == null : "Invalid to set timer state " + state + " with executing Thread " + thread ; this . timerState = state ; this . executingThread = thread ;


signature:
public class ResteasyDeploymentData { /** * Merges a list of additional JAX - RS deployment data with this lot of deployment data .
 * @ param deploymentData */
public void merge ( final List < ResteasyDeploymentData > deploymentData ) throws DeploymentUnitProcessingException { } }

implementation: for ( ResteasyDeploymentData data : deploymentData ) { scannedApplicationClasses . addAll ( data . getScannedApplicationClasses ( ) ) ; if ( scanResources ) { scannedResourceClasses . addAll ( data . getScannedResourceClasses ( ) ) ; scannedJndiComponentResources . addAll ( data . getScannedJndiComponentResources ( ) ) ; } if ( scanProviders ) { scannedProviderClasses . addAll ( data . getScannedProviderClasses ( ) ) ; } }


signature:
public class ModuleDefImpl { /** * LocalIRObject implementation - - - - - */
public IRObject getReference ( ) { } }

implementation: if ( ref == null ) { ref = org . omg . CORBA . ModuleDefHelper . narrow ( servantToReference ( new ModuleDefPOATie ( this ) ) ) ; } return ref ;


signature:
public class ModuleDefImpl { /** * ContainedImpl implementation - - - - - */
public Description describe ( ) { } }

implementation: String defined_in_id = "IR" ; if ( defined_in instanceof ContainedOperations ) defined_in_id = ( ( ContainedOperations ) defined_in ) . id ( ) ; ModuleDescription md = new ModuleDescription ( name , id , defined_in_id , version ) ; Any any = getORB ( ) . create_any ( ) ; ModuleDescriptionHelper . insert ( any , md ) ; return new Description ( DefinitionKind . dk_Module , any ) ;


signature:
public class JavaEEDependencyProcessor { /** * Add the EE APIs as a dependency to all deployments
 * @ param phaseContext the deployment unit context
 * @ throws DeploymentUnitProcessingException */
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( Attachments . MODULE_SPECIFICATION ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; // add jboss - invocation classes needed by the proxies
ModuleDependency invocation = new ModuleDependency ( moduleLoader , JBOSS_INVOCATION_ID , false , false , false , false ) ; invocation . addImportFilter ( PathFilters . is ( "org/jboss/invocation/proxy/classloading" ) , true ) ; invocation . addImportFilter ( PathFilters . acceptAll ( ) , false ) ; moduleSpecification . addSystemDependency ( invocation ) ; ModuleDependency ee = new ModuleDependency ( moduleLoader , JBOSS_AS_EE , false , false , false , false ) ; ee . addImportFilter ( PathFilters . is ( "org/jboss/as/ee/component/serialization" ) , true ) ; ee . addImportFilter ( PathFilters . is ( "org/jboss/as/ee/concurrent" ) , true ) ; ee . addImportFilter ( PathFilters . is ( "org/jboss/as/ee/concurrent/handle" ) , true ) ; ee . addImportFilter ( PathFilters . acceptAll ( ) , false ) ; moduleSpecification . addSystemDependency ( ee ) ; // add dep for naming permission
moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , ModuleIdentifier . create ( WILDFLY_NAMING ) , false , false , false , false ) ) ; // we always add all Java EE API modules , as the platform spec requires them to always be available
// we do not just add the javaee . api module , as this breaks excludes
for ( final ModuleIdentifier moduleIdentifier : JAVA_EE_API_MODULES ) { moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , moduleIdentifier , true , false , true , false ) ) ; }


signature:
public class UndertowDeploymentInfoService { /** * < p > Adds to the deployment the { @ link org . wildfly . extension . undertow . security . jaspi . JASPICAuthenticationMechanism } , if necessary . The handler will be added if the security domain
 * is configured with JASPI authentication . < / p >
 * @ param deploymentInfo */
private void handleJASPIMechanism ( final DeploymentInfo deploymentInfo ) { } }

implementation: ApplicationPolicy applicationPolicy = SecurityConfiguration . getApplicationPolicy ( this . securityDomain ) ; if ( applicationPolicy != null && JASPIAuthenticationInfo . class . isInstance ( applicationPolicy . getAuthenticationInfo ( ) ) ) { String authMethod = null ; LoginConfig loginConfig = deploymentInfo . getLoginConfig ( ) ; if ( loginConfig != null && loginConfig . getAuthMethods ( ) . size ( ) > 0 ) { authMethod = loginConfig . getAuthMethods ( ) . get ( 0 ) . getName ( ) ; } deploymentInfo . setJaspiAuthenticationMechanism ( new JASPICAuthenticationMechanism ( securityDomain , authMethod ) ) ; deploymentInfo . setSecurityContextFactory ( new JASPICSecurityContextFactory ( this . securityDomain ) ) ; deploymentInfo . addOuterHandlerChainWrapper ( next -> new JASPICSecureResponseHandler ( next ) ) ; }


signature:
public class UndertowDeploymentInfoService { /** * Sets the { @ link JACCAuthorizationManager } in the specified { @ link DeploymentInfo } if the webapp security domain
 * has defined a JACC authorization module .
 * @ param deploymentInfo the { @ link DeploymentInfo } instance . */
private void handleJACCAuthorization ( final DeploymentInfo deploymentInfo ) { } }

implementation:
// TODO make the authorization manager implementation configurable in Undertow or jboss - web . xml
ApplicationPolicy applicationPolicy = SecurityConfiguration . getApplicationPolicy ( this . securityDomain ) ; if ( applicationPolicy != null ) { AuthorizationInfo authzInfo = applicationPolicy . getAuthorizationInfo ( ) ; if ( authzInfo != null ) { for ( AuthorizationModuleEntry entry : authzInfo . getModuleEntries ( ) ) { if ( JACCAuthorizationModule . class . getName ( ) . equals ( entry . getPolicyModuleName ( ) ) ) { deploymentInfo . setAuthorizationManager ( JACCAuthorizationManager . INSTANCE ) ; break ; } } } }


signature:
public class UndertowDeploymentInfoService { /** * Convert the authentication method name from the format specified in the web . xml to the format used by
 * { @ link javax . servlet . http . HttpServletRequest } .
 * If the auth method is not recognised then it is returned as - is .
 * @ return The converted auth method .
 * @ throws NullPointerException if no configuredMethod is supplied . */
private static List < AuthMethodConfig > authMethod ( String configuredMethod ) { } }

implementation: if ( configuredMethod == null ) { return Collections . singletonList ( new AuthMethodConfig ( HttpServletRequest . BASIC_AUTH ) ) ; } return AuthMethodParser . parse ( configuredMethod , Collections . singletonMap ( "CLIENT-CERT" , HttpServletRequest . CLIENT_CERT_AUTH ) ) ;


signature:
public class EJBComponentDescription { /** * Sets up a { @ link ComponentConfigurator } which then sets up the relevant dependencies on the transaction manager services for the { @ link EJBComponentCreateService } */
protected void addTransactionManagerDependencies ( ) { } }

implementation:
this . getConfigurators ( ) . add ( new ComponentConfigurator ( ) { @ Override public void configure ( final DeploymentPhaseContext context , final ComponentDescription description , final ComponentConfiguration componentConfiguration ) throws DeploymentUnitProcessingException { componentConfiguration . getCreateDependencies ( ) . add ( new DependencyConfigurator < EJBComponentCreateService > ( ) { @ Override public void configureDependency ( final ServiceBuilder < ? > serviceBuilder , final EJBComponentCreateService ejbComponentCreateService ) throws DeploymentUnitProcessingException { CapabilityServiceSupport support = context . getDeploymentUnit ( ) . getAttachment ( org . jboss . as . server . deployment . Attachments . CAPABILITY_SERVICE_SUPPORT ) ; // add dependency on the local transaction provider
serviceBuilder . requires ( support . getCapabilityServiceName ( "org.wildfly.transactions.global-default-local-provider" ) ) ; // add dependency on TransactionSynchronizationRegistry
serviceBuilder . addDependency ( support . getCapabilityServiceName ( "org.wildfly.transactions.transaction-synchronization-registry" ) , TransactionSynchronizationRegistry . class , ejbComponentCreateService . getTransactionSynchronizationRegistryInjector ( ) ) ; } } ) ; } } ) ;


signature:
public class EJBComponentDescription { /** * Sets up a { @ link ComponentConfigurator } which then sets up the dependency on the EJBSuspendHandlerService service for the { @ link EJBComponentCreateService } */
protected void addEJBSuspendHandlerDependency ( ) { } }

implementation: getConfigurators ( ) . add ( new ComponentConfigurator ( ) { @ Override public void configure ( final DeploymentPhaseContext context , final ComponentDescription description , final ComponentConfiguration componentConfiguration ) throws DeploymentUnitProcessingException { componentConfiguration . getCreateDependencies ( ) . add ( new DependencyConfigurator < EJBComponentCreateService > ( ) { @ Override public void configureDependency ( final ServiceBuilder < ? > serviceBuilder , final EJBComponentCreateService ejbComponentCreateService ) throws DeploymentUnitProcessingException { serviceBuilder . addDependency ( EJBSuspendHandlerService . SERVICE_NAME , EJBSuspendHandlerService . class , ejbComponentCreateService . getEJBSuspendHandlerInjector ( ) ) ; } } ) ; } } ) ;


signature:
public class EJBComponentDescription { /** * Sets up a { @ link ComponentConfigurator } which then sets up the dependency on the ServerSecurityManager service for the { @ link EJBComponentCreateService } */
protected void addServerSecurityManagerDependency ( ) { } }

implementation: getConfigurators ( ) . add ( new ComponentConfigurator ( ) { @ Override public void configure ( final DeploymentPhaseContext context , final ComponentDescription description , final ComponentConfiguration componentConfiguration ) throws DeploymentUnitProcessingException { if ( ! ( ( EJBComponentDescription ) description ) . isSecurityDomainKnown ( ) ) { final DeploymentUnit deploymentUnit = context . getDeploymentUnit ( ) ; final CapabilityServiceSupport support = deploymentUnit . getAttachment ( org . jboss . as . server . deployment . Attachments . CAPABILITY_SERVICE_SUPPORT ) ; componentConfiguration . getCreateDependencies ( ) . add ( new DependencyConfigurator < EJBComponentCreateService > ( ) { @ Override public void configureDependency ( final ServiceBuilder < ? > serviceBuilder , final EJBComponentCreateService ejbComponentCreateService ) throws DeploymentUnitProcessingException { serviceBuilder . addDependency ( support . getCapabilityServiceName ( "org.wildfly.legacy-security.server-security-manager" ) , ServerSecurityManager . class , ejbComponentCreateService . getServerSecurityManagerInjector ( ) ) ; } } ) ; } } } ) ;


signature:
public class EJBComponentDescription { /** * Returns true if this component description has any security metadata configured at the EJB level .
 * Else returns false . Note that this method does * not * consider method level security metadata .
 * @ return */
public boolean hasBeanLevelSecurityMetadata ( ) { } }

implementation:
// if an explicit security - domain is present , then we consider it the bean to be processed by security interceptors
if ( securityDomain != null ) { return true ; } // if a run - as is present , then we consider it the bean to be processed by security interceptors
if ( runAsRole != null ) { return true ; } // if a run - as - principal is present , then we consider it the bean to be processed by security interceptors
if ( runAsPrincipal != null ) { return true ; } // if security roles are configured then we consider the bean to be processed by security interceptors
if ( securityRoles != null && ! securityRoles . isEmpty ( ) ) { return true ; } // if security role links are configured then we consider the bean to be processed by security interceptors
if ( securityRoleLinks != null && ! securityRoleLinks . isEmpty ( ) ) { return true ; } // if declared roles are configured then we consider the bean to be processed by security interceptors
if ( declaredRoles != null && ! declaredRoles . isEmpty ( ) ) { return true ; } // no security metadata at bean level
return false ;


signature:
public class EJBComponentDescription { /** * Returns a combined map of class and method level container interceptors */
public Set < InterceptorDescription > getAllContainerInterceptors ( ) { } }

implementation: if ( this . allContainerInterceptors == null ) { this . allContainerInterceptors = new HashSet < InterceptorDescription > ( ) ; this . allContainerInterceptors . addAll ( this . classLevelContainerInterceptors ) ; if ( ! this . excludeDefaultContainerInterceptors ) { this . allContainerInterceptors . addAll ( this . defaultContainerInterceptors ) ; } for ( List < InterceptorDescription > interceptors : this . methodLevelContainerInterceptors . values ( ) ) { this . allContainerInterceptors . addAll ( interceptors ) ; } } return this . allContainerInterceptors ;


signature:
public class ApplicableMethodInformation { /** * Style 1 ( 13.3.7.2.1 @ 1)
 * @ param methodIntf the method - intf the annotations apply to or null if EJB class itself
 * @ param attribute */
public void setAttribute ( MethodIntf methodIntf , String className , T attribute ) { } }

implementation: if ( methodIntf != null && className != null ) throw EjbLogger . ROOT_LOGGER . bothMethodIntAndClassNameSet ( componentName ) ; if ( methodIntf == null ) { style1 . put ( className , attribute ) ; } else perViewStyle1 . put ( methodIntf , attribute ) ;


signature:
public class ApplicableMethodInformation { /** * Style 2 ( 13.3.7.2.1 @ 2)
 * @ param methodIntf the method - intf the annotations apply to or null if EJB class itself
 * @ param transactionAttribute
 * @ param methodName */
public void setAttribute ( MethodIntf methodIntf , T transactionAttribute , String methodName ) { } }

implementation: if ( methodIntf == null ) style2 . put ( methodName , transactionAttribute ) ; else perViewStyle2 . pick ( methodIntf ) . put ( methodName , transactionAttribute ) ;


signature:
public class ApplicableMethodInformation { /** * Style 3 ( 13.3.7.2.1 @ 3)
 * @ param methodIntf the method - intf the annotations apply to or null if EJB class itself
 * @ param transactionAttribute
 * @ param methodName
 * @ param methodParams */
public void setAttribute ( MethodIntf methodIntf , T transactionAttribute , final String className , String methodName , String ... methodParams ) { } }

implementation: ArrayKey methodParamsKey = new ArrayKey ( ( Object [ ] ) methodParams ) ; if ( methodIntf == null ) style3 . pick ( className ) . pick ( methodName ) . put ( methodParamsKey , transactionAttribute ) ; else perViewStyle3 . pick ( methodIntf ) . pick ( methodName ) . put ( methodParamsKey , transactionAttribute ) ;


signature:
public class ApplicableMethodInformation { /** * Returns true if the given transaction specification was expliitly specified at a method level , returns
 * false if it was inherited from the default */
public boolean isMethodLevel ( MethodIntf methodIntf , Method method , MethodIntf defaultMethodIntf ) { } }

implementation: assert methodIntf != null : "methodIntf is null" ; assert method != null : "method is null" ; Method classMethod = resolveRealMethod ( method ) ; String [ ] methodParams = MethodInfoHelper . getCanonicalParameterTypes ( classMethod ) ; final String methodName = classMethod . getName ( ) ; final String className = classMethod . getDeclaringClass ( ) . getName ( ) ; ArrayKey methodParamsKey = new ArrayKey ( ( Object [ ] ) methodParams ) ; T attr = get ( get ( get ( perViewStyle3 , methodIntf ) , methodName ) , methodParamsKey ) ; if ( attr != null ) return true ; attr = get ( get ( perViewStyle2 , methodIntf ) , methodName ) ; if ( attr != null ) return true ; attr = get ( perViewStyle1 , methodIntf ) ; if ( attr != null ) return false ; attr = get ( get ( get ( style3 , className ) , methodName ) , methodParamsKey ) ; if ( attr != null ) return true ; attr = get ( style2 , methodName ) ; if ( attr != null ) return true ; attr = get ( style1 , className ) ; if ( attr != null ) return false ; if ( defaultMethodIntf == null ) { return false ; } else { return isMethodLevel ( defaultMethodIntf , method , null ) ; }


signature:
public class WarJACCDeployer { /** * { @ inheritDoc } */
@ Override protected JaccService < WarMetaData > createService ( String contextId , WarMetaData metaData , Boolean standalone ) { } }

implementation: return new WarJACCService ( contextId , metaData , standalone ) ;


signature:
public class WebServerService { /** * todo we need to handle cases when deployments reference listeners / server / host directly */
@ Override public int getPort ( final String protocol , final boolean secure ) { } }

implementation: Map < String , UndertowListener > listeners = getListenerMap ( ) ; UndertowListener listener = null ; for ( String p : listeners . keySet ( ) ) { if ( protocol . toLowerCase ( ) . contains ( p ) ) { listener = listeners . get ( p ) ; } } if ( listener != null && listener . getProtocol ( ) == HttpListenerService . PROTOCOL && secure ) { if ( listeners . containsKey ( HttpsListenerService . PROTOCOL ) ) { listener = listeners . get ( HttpsListenerService . PROTOCOL ) ; } else { UndertowLogger . ROOT_LOGGER . secureListenerNotAvailableForPort ( protocol ) ; } } if ( listener != null ) { SocketBinding binding = listener . getSocketBinding ( ) ; return binding . getAbsolutePort ( ) ; } throw UndertowLogger . ROOT_LOGGER . noPortListeningForProtocol ( protocol ) ;


signature:
public class EJBViewMethodSecurityAttributesService { /** * Returns a { @ link ServiceName } for the { @ link EJBViewMethodSecurityAttributesService }
 * @ param appName The application name to which the bean belongs . Can be null if the bean is < b > not < / b > deployed in a . ear
 * @ param moduleName The module name to which the bean belongs
 * @ param beanName The bean name
 * @ param viewClassName The fully qualified class name of the EJB view
 * @ return */
public static ServiceName getServiceName ( final String appName , final String moduleName , final String beanName , final String viewClassName ) { } }

implementation: final ServiceName serviceName ; if ( appName != null ) { serviceName = BASE_SERVICE_NAME . append ( appName ) ; } else { serviceName = BASE_SERVICE_NAME ; } return serviceName . append ( moduleName ) . append ( beanName ) . append ( viewClassName ) ;


signature:
public class CDRStream { /** * Returns the abbreviated name of the marshaller for given
 * < code > Class < / code > .
 * < p > Abbreviated names of marshallers for basic types follow the usual
 * Java convention :
 * < br >
 * < pre >
 * type abbrev name
 * boolean " Z "
 * byte " B "
 * char " C "
 * double " D "
 * float " F "
 * int " I "
 * long " J "
 * short " S "
 * void " V "
 * < / pre >
 * < p > The abbreviated names of marshallers for object types are :
 * < br >
 * < pre >
 * java . lang . String " G " ( strinG )
 * RMI remote interface " R " + interfaceName
 * RMI abstract interface " A "
 * serializable " E " ( sErializablE )
 * valuetype " L " + className
 * externalizable " X " ( eXternalizable )
 * org . omg . CORBA . Object " M " ( oMg )
 * IDL interface " N " + interfaceName
 * java . lang . Object " O "
 * < / pre >
 * < p > As an example : the abbreviated name of a marshaller for a valuetype
 * class named < code > Foo < / code > is the string < code > " LFoo " < / code > . */
public static String abbrevFor ( Class clz ) { } }

implementation:
if ( clz == Boolean . TYPE ) { return "Z" ; } else if ( clz == Byte . TYPE ) { return "B" ; } else if ( clz == Character . TYPE ) { return "C" ; } else if ( clz == Double . TYPE ) { return "D" ; } else if ( clz == Float . TYPE ) { return "F" ; } else if ( clz == Integer . TYPE ) { return "I" ; } else if ( clz == Long . TYPE ) { return "J" ; } else if ( clz == Short . TYPE ) { return "S" ; } else if ( clz == Void . TYPE ) { return "V" ; } else if ( clz == String . class ) { return "G" ; // strinG
} else if ( RmiIdlUtil . isRMIIDLRemoteInterface ( clz ) ) { return "R" + clz . getName ( ) ; // Remote interface
} else if ( clz == org . omg . CORBA . Object . class ) { return "M" ; // oMg ( CORBA Object )
} else if ( org . omg . CORBA . Object . class . isAssignableFrom ( clz ) ) { return "N" + clz . getName ( ) ; // IDL iNterface
} else if ( IDLEntity . class . isAssignableFrom ( clz ) ) { return "L" + clz . getName ( ) ; // vaLuetype
} else if ( clz == Serializable . class ) { return "E" ; // sErializablE
} else if ( RmiIdlUtil . isAbstractInterface ( clz ) ) { return "A" ; // Abstract interface
} else if ( Serializable . class . isAssignableFrom ( clz ) ) { return "L" + clz . getName ( ) ; // vaLuetype
} else if ( Externalizable . class . isAssignableFrom ( clz ) ) { return "X" ; // eXternalizable
} else if ( clz == Object . class ) { return "O" ; // Object
} else { return "L" + clz . getName ( ) ; // vaLuetype
}


signature:
public class CDRStream { /** * Returns a < code > CDRStreamReader < / code > given an abbreviated name
 * and a < code > ClassLoader < / code > for valuetype classes . */
public static CDRStreamReader readerFor ( String s , ClassLoader cl ) { } }

implementation:
switch ( s . charAt ( 0 ) ) { case 'A' : return AbstractInterfaceReader . instance ; case 'B' : return ByteReader . instance ; case 'C' : return CharReader . instance ; case 'D' : return DoubleReader . instance ; case 'E' : return SerializableReader . instance ; case 'F' : return FloatReader . instance ; case 'G' : return StringReader . instance ; case 'I' : return IntReader . instance ; case 'J' : return LongReader . instance ; case 'L' : try { // Use Class . forName ( ) ( rather than cl . loadClass ( ) ) , because
// Class . forName ( ) loads Java array types ( which are valuetypes ) .
return new ValuetypeReader ( Class . forName ( s . substring ( 1 ) , true , cl ) ) ; } catch ( ClassNotFoundException e ) { throw IIOPLogger . ROOT_LOGGER . errorLoadingClass ( s . substring ( 1 ) , e ) ; } case 'M' : return CorbaObjectReader . instance ; case 'N' : try { return new IdlInterfaceReader ( cl . loadClass ( s . substring ( 1 ) ) ) ; } catch ( ClassNotFoundException e ) { throw IIOPLogger . ROOT_LOGGER . errorLoadingClass ( s . substring ( 1 ) , e ) ; } case 'O' : return ObjectReader . instance ; case 'R' : try { return new RemoteReader ( cl . loadClass ( s . substring ( 1 ) ) ) ; } catch ( ClassNotFoundException e ) { throw IIOPLogger . ROOT_LOGGER . errorLoadingClass ( s . substring ( 1 ) , e ) ; } case 'S' : return ShortReader . instance ; case 'V' : return null ; case 'X' : return ExternalizableReader . instance ; case 'Z' : return BooleanReader . instance ; default : return null ; }


signature:
public class CDRStream { /** * Returns a < code > CDRStreamWriter < / code > given an abbreviated name
 * and a < code > ClassLoader < / code > for valuetype classes . */
public static CDRStreamWriter writerFor ( String s , ClassLoader cl ) { } }

implementation:
switch ( s . charAt ( 0 ) ) { case 'A' : return AbstractInterfaceWriter . instance ; case 'B' : return ByteWriter . instance ; case 'C' : return CharWriter . instance ; case 'D' : return DoubleWriter . instance ; case 'E' : return SerializableWriter . instance ; case 'F' : return FloatWriter . instance ; case 'G' : return StringWriter . instance ; case 'I' : return IntWriter . instance ; case 'J' : return LongWriter . instance ; case 'L' : try { // Use Class . forName ( ) ( rather than cl . loadClass ( ) ) , because
// Class . forName ( ) loads Java array types ( which are valuetypes ) .
return new ValuetypeWriter ( Class . forName ( s . substring ( 1 ) , true , cl ) ) ; } catch ( ClassNotFoundException e ) { throw IIOPLogger . ROOT_LOGGER . errorLoadingClass ( s . substring ( 1 ) , e ) ; } case 'M' : return CorbaObjectWriter . instance ; case 'N' : try { return new IdlInterfaceWriter ( cl . loadClass ( s . substring ( 1 ) ) ) ; } catch ( ClassNotFoundException e ) { throw IIOPLogger . ROOT_LOGGER . errorLoadingClass ( s . substring ( 1 ) , e ) ; } case 'O' : return ObjectWriter . instance ; case 'R' : return RemoteWriter . instance ; case 'S' : return ShortWriter . instance ; case 'V' : return null ; case 'X' : return ExternalizableWriter . instance ; case 'Z' : return BooleanWriter . instance ; default : return null ; }


signature:
public class CDRStream { /** * Returns the < code > CDRStreamReader < / code > for a given < code > Class < / code > . */
public static CDRStreamReader readerFor ( Class clz ) { } }

implementation: if ( clz == Boolean . TYPE ) { return BooleanReader . instance ; } else if ( clz == Byte . TYPE ) { return ByteReader . instance ; } else if ( clz == Character . TYPE ) { return CharReader . instance ; } else if ( clz == Double . TYPE ) { return DoubleReader . instance ; } else if ( clz == Float . TYPE ) { return FloatReader . instance ; } else if ( clz == Integer . TYPE ) { return IntReader . instance ; } else if ( clz == Long . TYPE ) { return LongReader . instance ; } else if ( clz == Short . TYPE ) { return ShortReader . instance ; } else if ( clz == Void . TYPE ) { return null ; } else if ( clz == String . class ) { return StringReader . instance ; } else if ( RmiIdlUtil . isRMIIDLRemoteInterface ( clz ) ) { return new RemoteReader ( clz ) ; } else if ( clz == org . omg . CORBA . Object . class ) { return CorbaObjectReader . instance ; } else if ( org . omg . CORBA . Object . class . isAssignableFrom ( clz ) ) { return new IdlInterfaceReader ( clz ) ; } else if ( IDLEntity . class . isAssignableFrom ( clz ) ) { return new ValuetypeReader ( clz ) ; } else if ( clz == Serializable . class ) { return SerializableReader . instance ; } else if ( RmiIdlUtil . isAbstractInterface ( clz ) ) { return AbstractInterfaceReader . instance ; } else if ( Serializable . class . isAssignableFrom ( clz ) ) { return new ValuetypeReader ( clz ) ; } else if ( Externalizable . class . isAssignableFrom ( clz ) ) { return ExternalizableReader . instance ; } else if ( clz == Object . class ) { return ObjectReader . instance ; } else { return new ValuetypeReader ( clz ) ; }


signature:
public class CDRStream { /** * Returns the < code > CDRStreamWriter < / code > for a given < code > Class < / code > . */
public static CDRStreamWriter writerFor ( Class clz ) { } }

implementation: if ( clz == Boolean . TYPE ) { return BooleanWriter . instance ; } else if ( clz == Byte . TYPE ) { return ByteWriter . instance ; } else if ( clz == Character . TYPE ) { return CharWriter . instance ; } else if ( clz == Double . TYPE ) { return DoubleWriter . instance ; } else if ( clz == Float . TYPE ) { return FloatWriter . instance ; } else if ( clz == Integer . TYPE ) { return IntWriter . instance ; } else if ( clz == Long . TYPE ) { return LongWriter . instance ; } else if ( clz == Short . TYPE ) { return ShortWriter . instance ; } else if ( clz == String . class ) { return StringWriter . instance ; } else if ( clz == Void . TYPE ) { return null ; } else if ( RmiIdlUtil . isRMIIDLRemoteInterface ( clz ) ) { return RemoteWriter . instance ; } else if ( clz == org . omg . CORBA . Object . class ) { return CorbaObjectWriter . instance ; } else if ( org . omg . CORBA . Object . class . isAssignableFrom ( clz ) ) { return new IdlInterfaceWriter ( clz ) ; } else if ( IDLEntity . class . isAssignableFrom ( clz ) ) { return new ValuetypeWriter ( clz ) ; } else if ( clz == Serializable . class ) { return SerializableWriter . instance ; } else if ( RmiIdlUtil . isAbstractInterface ( clz ) ) { return AbstractInterfaceWriter . instance ; } else if ( Serializable . class . isAssignableFrom ( clz ) ) { return new ValuetypeWriter ( clz ) ; } else if ( Externalizable . class . isAssignableFrom ( clz ) ) { return ExternalizableWriter . instance ; } else if ( clz == Object . class ) { return ObjectWriter . instance ; } else { return new ValuetypeWriter ( clz ) ; }


signature:
public class AbstractComponentConfigurator { /** * Sets up all resource injections for a class . This takes into account injections that have been specified in the module and component deployment descriptors
 * Note that this does not take superclasses into consideration , only injections on the current class
 * @ param clazz The class or superclass to perform injection for
 * @ param actualClass The actual component or interceptor class
 * @ param classDescription The class description , may be null
 * @ param moduleDescription The module description
 * @ param description The component description
 * @ param configuration The component configuration
 * @ param context The phase context
 * @ param injectors The list of injectors for the current component
 * @ param instanceKey The key that identifies the instance to inject in the interceptor context
 * @ param uninjectors The list of uninjections for the current component
 * @ throws org . jboss . as . server . deployment . DeploymentUnitProcessingException */
protected void mergeInjectionsForClass ( final Class < ? > clazz , final Class < ? > actualClass , final EEModuleClassDescription classDescription , final EEModuleDescription moduleDescription , final DeploymentReflectionIndex deploymentReflectionIndex , final ComponentDescription description , final ComponentConfiguration configuration , final DeploymentPhaseContext context , final Deque < InterceptorFactory > injectors , final Object instanceKey , final Deque < InterceptorFactory > uninjectors , boolean metadataComplete ) throws DeploymentUnitProcessingException { } }

implementation:
final Map < InjectionTarget , ResourceInjectionConfiguration > mergedInjections = new HashMap < InjectionTarget , ResourceInjectionConfiguration > ( ) ; if ( classDescription != null && ! metadataComplete ) { mergedInjections . putAll ( classDescription . getInjectionConfigurations ( ) ) ; } mergedInjections . putAll ( moduleDescription . getResourceInjections ( clazz . getName ( ) ) ) ; mergedInjections . putAll ( description . getResourceInjections ( clazz . getName ( ) ) ) ; for ( final ResourceInjectionConfiguration injectionConfiguration : mergedInjections . values ( ) ) { if ( ! moduleDescription . isAppClient ( ) && injectionConfiguration . getTarget ( ) . isStatic ( context . getDeploymentUnit ( ) ) ) { ROOT_LOGGER . debugf ( "Injection for a member with static modifier is only acceptable on application clients, ignoring injection for target %s" , injectionConfiguration . getTarget ( ) ) ; continue ; } if ( injectionConfiguration . getTarget ( ) instanceof MethodInjectionTarget ) { // we need to make sure that if this is a method injection it has not been overriden
final MethodInjectionTarget mt = ( MethodInjectionTarget ) injectionConfiguration . getTarget ( ) ; Method method = mt . getMethod ( deploymentReflectionIndex , clazz ) ; if ( ! isNotOverriden ( clazz , method , actualClass , deploymentReflectionIndex ) ) { continue ; } } final Object valueContextKey = new Object ( ) ; final InjectedValue < ManagedReferenceFactory > managedReferenceFactoryValue = new InjectedValue < ManagedReferenceFactory > ( ) ; configuration . getStartDependencies ( ) . add ( new ComponentDescription . InjectedConfigurator ( injectionConfiguration , configuration , context , managedReferenceFactoryValue ) ) ; injectors . addFirst ( injectionConfiguration . getTarget ( ) . createInjectionInterceptorFactory ( instanceKey , valueContextKey , managedReferenceFactoryValue , context . getDeploymentUnit ( ) , injectionConfiguration . isOptional ( ) ) ) ; uninjectors . addLast ( new ImmediateInterceptorFactory ( new ManagedReferenceReleaseInterceptor ( valueContextKey ) ) ) ; }


signature:
public class MessagingSubsystemParser { /** * Check one and only one of the 2 elements has been defined */
protected static void checkOnlyOneOfElements ( XMLExtendedStreamReader reader , Set < Element > seen , Element element1 , Element element2 ) throws XMLStreamException { } }

implementation: if ( ! seen . contains ( element1 ) && ! seen . contains ( element2 ) ) { throw new XMLStreamException ( MessagingLogger . ROOT_LOGGER . required ( element1 . getLocalName ( ) , element2 . getLocalName ( ) ) , reader . getLocation ( ) ) ; } if ( seen . contains ( element1 ) && seen . contains ( element2 ) ) { throw new XMLStreamException ( MessagingLogger . ROOT_LOGGER . onlyOneRequired ( element1 . getLocalName ( ) , element2 . getLocalName ( ) ) , reader . getLocation ( ) ) ; }


signature:
public class BatchJobExecutionResource { /** * Note the access to the { @ link # children } is < strong > not < / strong > guarded here and needs to be externally
 * guarded . */
private void refreshChildren ( ) { } }

implementation:
final List < JobExecution > executions = new ArrayList < > ( ) ; // Casting to ( Supplier < List < JobInstance > > ) is done here on purpose as a workaround for a bug in 1.8.0_45
final List < JobInstance > instances = jobOperator . allowMissingJob ( ( Supplier < List < JobInstance > > ) ( ) -> jobOperator . getJobInstances ( jobName , 0 , jobOperator . getJobInstanceCount ( jobName ) ) , Collections . emptyList ( ) ) ; for ( JobInstance instance : instances ) { executions . addAll ( jobOperator . getJobExecutions ( instance ) ) ; } children . clear ( ) ; for ( JobExecution execution : executions ) { final String name = Long . toString ( execution . getExecutionId ( ) ) ; children . add ( name ) ; }


signature:
public class QueueDefinition { /** * [ AS7-5850 ] Core queues created with ActiveMQ API does not create WildFly resources
 * For backwards compatibility if an operation is invoked on a queue that has no corresponding resources ,
 * we forward the operation to the corresponding runtime - queue resource ( which * does * exist ) .
 * @ return true if the operation is forwarded to the corresponding runtime - queue resource , false else . */
static boolean forwardToRuntimeQueue ( OperationContext context , ModelNode operation , OperationStepHandler handler ) { } }

implementation:
PathAddress address = context . getCurrentAddress ( ) ; // do not forward if the current operation is for a runtime - queue already :
if ( RUNTIME_QUEUE . equals ( address . getLastElement ( ) . getKey ( ) ) ) { return false ; } String queueName = address . getLastElement ( ) . getValue ( ) ; PathAddress activeMQPathAddress = MessagingServices . getActiveMQServerPathAddress ( address ) ; if ( context . readResourceFromRoot ( activeMQPathAddress , false ) . hasChild ( address . getLastElement ( ) ) ) { return false ; } else { // there is no registered queue resource , forward to the runtime - queue address instead
ModelNode forwardOperation = operation . clone ( ) ; forwardOperation . get ( ModelDescriptionConstants . OP_ADDR ) . set ( activeMQPathAddress . append ( RUNTIME_QUEUE , queueName ) . toModelNode ( ) ) ; context . addStep ( forwardOperation , handler , OperationContext . Stage . RUNTIME , true ) ; return true ; }


signature:
public class PooledConnectionFactoryDefinition { /** * * define the attributes in the * same order than the XSD * to write them to the XML configuration by simply iterating over the array */
private static ConnectionFactoryAttribute [ ] define ( ConnectionFactoryAttribute [ ] specific , ConnectionFactoryAttribute ... common ) { } }

implementation:
int size = common . length + specific . length ; ConnectionFactoryAttribute [ ] result = new ConnectionFactoryAttribute [ size ] ; arraycopy ( specific , 0 , result , 0 , specific . length ) ; for ( int i = 0 ; i < common . length ; i ++ ) { ConnectionFactoryAttribute attr = common [ i ] ; AttributeDefinition definition = attr . getDefinition ( ) ; ConnectionFactoryAttribute newAttr ; // replace the reconnect - attempts attribute to use a different default value for pooled CF
if ( definition == Common . RECONNECT_ATTEMPTS ) { AttributeDefinition copy = copy ( Pooled . RECONNECT_ATTEMPTS , AttributeAccess . Flag . RESTART_ALL_SERVICES ) ; newAttr = ConnectionFactoryAttribute . create ( copy , Pooled . RECONNECT_ATTEMPTS_PROP_NAME , true ) ; } else { AttributeDefinition copy = copy ( definition , AttributeAccess . Flag . RESTART_ALL_SERVICES ) ; newAttr = ConnectionFactoryAttribute . create ( copy , attr . getPropertyName ( ) , attr . isResourceAdapterProperty ( ) , attr . isInboundConfig ( ) ) ; } result [ specific . length + i ] = newAttr ; } return result ;


signature:
public class AbstractConfigVisitorNode { /** * Get temp bean info .
 * @ param visitor the visitor
 * @ param className the class name
 * @ return bean info */
protected static BeanInfo getTempBeanInfo ( ConfigVisitor visitor , String className ) { } }

implementation: return getTempBeanInfo ( visitor , getType ( visitor , className ) ) ;


signature:
public class AbstractConfigVisitorNode { /** * Get temp bean info .
 * @ param visitor the visitor
 * @ param clazz the class
 * @ return bean info */
@ SuppressWarnings ( { } }

implementation: "unchecked" } ) protected static BeanInfo getTempBeanInfo ( ConfigVisitor visitor , Class < ? > clazz ) { return new DefaultBeanInfo ( visitor . getReflectionIndex ( ) , clazz ) ;


signature:
public class AbstractConfigVisitorNode { /** * Load class .
 * @ param visitor the visitor
 * @ param className the class name
 * @ return class or null if null class name */
protected static Class < ? > getType ( ConfigVisitor visitor , String className ) { } }

implementation: if ( className != null ) { try { return visitor . getModule ( ) . getClassLoader ( ) . loadClass ( className ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( e ) ; } } return null ;


signature:
public class AbstractConfigVisitorNode { /** * Get component type .
 * @ param type the type
 * @ param index the component index
 * @ return component ' s class or null if cannot be determined */
static Type getComponentType ( ParameterizedType type , int index ) { } }

implementation: Type [ ] tp = type . getActualTypeArguments ( ) ; if ( index + 1 > tp . length ) return null ; return tp [ index ] ;


signature:
public class ElytronIntegrationResourceDefinitions { /** * Defines a resource that represents an Elytron - compatible realm that can be exported by the legacy security subsystem .
 * The constructed { @ code SecurityRealm } wraps a legacy { @ code SecurityDomainContext } and delegates authentication
 * decisions to that context .
 * To export the realm the resource uses a { @ code BasicAddHandler } implementation that registers the security - realm
 * capability and implements a { @ code org . jboss . as . security . elytron . BasicService . ValueSupplier } that uses the injected
 * { @ code SecurityDomainContext } to create and return an instance of { @ code SecurityDomainContextRealm } . */
public static ResourceDefinition getElytronRealmResourceDefinition ( ) { } }

implementation: final AttributeDefinition [ ] attributes = new AttributeDefinition [ ] { LEGACY_JAAS_CONFIG , APPLY_ROLE_MAPPERS } ; final AbstractAddStepHandler addHandler = new BasicAddHandler < SecurityRealm > ( attributes , SECURITY_REALM_RUNTIME_CAPABILITY ) { @ Override protected BasicService . ValueSupplier < SecurityRealm > getValueSupplier ( ServiceBuilder < SecurityRealm > serviceBuilder , OperationContext context , ModelNode model ) throws OperationFailedException { final String legacyJAASConfig = asStringIfDefined ( context , LEGACY_JAAS_CONFIG , model ) ; final boolean applyRoleMappers = APPLY_ROLE_MAPPERS . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final InjectedValue < SecurityDomainContext > securityDomainContextInjector = new InjectedValue < > ( ) ; if ( legacyJAASConfig != null ) { serviceBuilder . addDependency ( SecurityDomainService . SERVICE_NAME . append ( legacyJAASConfig ) , SecurityDomainContext . class , securityDomainContextInjector ) ; } return ( ) -> { final SecurityDomainContext domainContext = securityDomainContextInjector . getValue ( ) ; return new SecurityDomainContextRealm ( domainContext , applyRoleMappers ) ; } ; } } ; return new BasicResourceDefinition ( Constants . ELYTRON_REALM , addHandler , attributes , SECURITY_REALM_RUNTIME_CAPABILITY ) ;


signature:
public class ElytronIntegrationResourceDefinitions { /** * Defines a resource that represents an Elytron - compatible key store that can be exported by a JSSE - enabled domain
 * in the legacy security subsystem .
 * To export the key store the resource uses a { @ code BasicAddHandler } implementation that registers the elytron key - store
 * capability and implements a { @ code org . jboss . as . security . elytron . BasicService . ValueSupplier } that uses the injected
 * { @ code SecurityDomainContext } to obtain a { @ code JSSESecurityDomain } . If such domain is found , its configured key
 * store is obtained and returned .
 * The { @ code ValueSupplier } implementation throws an exception if the referenced legacy domain is not a JSSE - enabled
 * domain or if the domain doesn ' t contain a key store configuration . */
public static ResourceDefinition getElytronKeyStoreResourceDefinition ( ) { } }

implementation: final AttributeDefinition [ ] attributes = new AttributeDefinition [ ] { LEGACY_JSSE_CONFIG } ; final AbstractAddStepHandler addHandler = new BasicAddHandler < KeyStore > ( attributes , KEY_STORE_RUNTIME_CAPABILITY ) { @ Override protected BasicService . ValueSupplier < KeyStore > getValueSupplier ( ServiceBuilder < KeyStore > serviceBuilder , OperationContext context , ModelNode model ) throws OperationFailedException { final String legacyJSSEConfig = asStringIfDefined ( context , LEGACY_JSSE_CONFIG , model ) ; final InjectedValue < SecurityDomainContext > securityDomainContextInjector = new InjectedValue < > ( ) ; if ( legacyJSSEConfig != null ) { serviceBuilder . addDependency ( SecurityDomainService . SERVICE_NAME . append ( legacyJSSEConfig ) , SecurityDomainContext . class , securityDomainContextInjector ) ; } return ( ) -> { final SecurityDomainContext domainContext = securityDomainContextInjector . getValue ( ) ; final JSSESecurityDomain jsseDomain = domainContext . getJSSE ( ) ; if ( jsseDomain == null ) { throw SecurityLogger . ROOT_LOGGER . unableToLocateJSSEConfig ( legacyJSSEConfig ) ; } final KeyStore keyStore = jsseDomain . getKeyStore ( ) ; if ( keyStore == null ) { throw SecurityLogger . ROOT_LOGGER . unableToLocateComponentInJSSEDomain ( "KeyStore" , legacyJSSEConfig ) ; } return keyStore ; } ; } } ; return new BasicResourceDefinition ( Constants . ELYTRON_KEY_STORE , addHandler , attributes , KEY_STORE_RUNTIME_CAPABILITY ) ;


signature:
public class ElytronIntegrationResourceDefinitions { /** * Defines a resource that represents Elytron - compatible key managers that can be exported by a JSSE - enabled domain
 * in the legacy security subsystem .
 * To export the key managers the resource uses a { @ code BasicAddHandler } implementation that registers the elytron
 * key - managers capability and implements a { @ code org . jboss . as . security . elytron . BasicService . ValueSupplier } that uses
 * the injected { @ code SecurityDomainContext } to obtain a { @ code JSSESecurityDomain } . If such domain is found , its
 * configured key manager array is obtained and returned .
 * The { @ code ValueSupplier } implementation throws an exception if the referenced legacy domain is not a JSSE - enabled
 * domain or if the domain doesn ' t contain a key store configuration that can be used to build the key managers . */
public static ResourceDefinition getElytronKeyManagersResourceDefinition ( ) { } }

implementation: final AttributeDefinition [ ] attributes = new AttributeDefinition [ ] { LEGACY_JSSE_CONFIG } ; final AbstractAddStepHandler addHandler = new BasicAddHandler < KeyManager > ( attributes , KEY_MANAGER_RUNTIME_CAPABILITY ) { @ Override protected BasicService . ValueSupplier < KeyManager > getValueSupplier ( ServiceBuilder < KeyManager > serviceBuilder , OperationContext context , ModelNode model ) throws OperationFailedException { final String legacyJSSEConfig = asStringIfDefined ( context , LEGACY_JSSE_CONFIG , model ) ; final InjectedValue < SecurityDomainContext > securityDomainContextInjector = new InjectedValue < > ( ) ; if ( legacyJSSEConfig != null ) { serviceBuilder . addDependency ( SecurityDomainService . SERVICE_NAME . append ( legacyJSSEConfig ) , SecurityDomainContext . class , securityDomainContextInjector ) ; } return ( ) -> { final SecurityDomainContext domainContext = securityDomainContextInjector . getValue ( ) ; final JSSESecurityDomain jsseDomain = domainContext . getJSSE ( ) ; if ( jsseDomain == null ) { throw SecurityLogger . ROOT_LOGGER . unableToLocateJSSEConfig ( legacyJSSEConfig ) ; } final KeyManager [ ] keyManagers = jsseDomain . getKeyManagers ( ) ; if ( keyManagers == null ) { throw SecurityLogger . ROOT_LOGGER . unableToLocateComponentInJSSEDomain ( "KeyManager" , legacyJSSEConfig ) ; } for ( KeyManager keyManager : keyManagers ) { if ( keyManager instanceof X509ExtendedKeyManager ) { return keyManager ; } } throw SecurityLogger . ROOT_LOGGER . expectedManagerTypeNotFound ( "KeyManager" , X509ExtendedKeyManager . class . getSimpleName ( ) , legacyJSSEConfig ) ; } ; } } ; return new BasicResourceDefinition ( Constants . ELYTRON_KEY_MANAGER , addHandler , attributes , KEY_MANAGER_RUNTIME_CAPABILITY ) ;


signature:
public class ElytronIntegrationResourceDefinitions { /** * Defines a resource that represents Elytron - compatible trust managers that can be exported by a JSSE - enabled domain
 * in the legacy security subsystem .
 * To export the trust managers the resource uses a { @ code BasicAddHandler } implementation that registers the elytron
 * trust - managers capability and implements a { @ code org . jboss . as . security . elytron . BasicService . ValueSupplier } that uses
 * the injected { @ code SecurityDomainContext } to obtain a { @ code JSSESecurityDomain } . If such domain is found , its
 * configured trust manager array is obtained and returned .
 * The { @ code ValueSupplier } implementation throws an exception if the referenced legacy domain is not a JSSE - enabled
 * domain or if the domain doesn ' t contain a trust store configuration that can be used to build the trust managers .
 * NOTE : The { @ code PicketBox } implementation of a { @ code JSSESecurityDomain } returns a reference to the key store if
 * a trust store was not configured . This means that the trust managers that it builds will use the configured key store
 * instead of throwing an exception to alert about a missing trust store configuration . So extra care must be taken
 * to ensure that the exported trust managers are being built using the correct trust stores . */
public static ResourceDefinition getElytronTrustManagersResourceDefinition ( ) { } }

implementation: final AttributeDefinition [ ] attributes = new AttributeDefinition [ ] { LEGACY_JSSE_CONFIG } ; final AbstractAddStepHandler addHandler = new BasicAddHandler < TrustManager > ( attributes , TRUST_MANAGER_RUNTIME_CAPABILITY ) { @ Override protected BasicService . ValueSupplier < TrustManager > getValueSupplier ( ServiceBuilder < TrustManager > serviceBuilder , OperationContext context , ModelNode model ) throws OperationFailedException { final String legacyJSSEConfig = asStringIfDefined ( context , LEGACY_JSSE_CONFIG , model ) ; final InjectedValue < SecurityDomainContext > securityDomainContextInjector = new InjectedValue < > ( ) ; if ( legacyJSSEConfig != null ) { serviceBuilder . addDependency ( SecurityDomainService . SERVICE_NAME . append ( legacyJSSEConfig ) , SecurityDomainContext . class , securityDomainContextInjector ) ; } return ( ) -> { final SecurityDomainContext domainContext = securityDomainContextInjector . getValue ( ) ; final JSSESecurityDomain jsseDomain = domainContext . getJSSE ( ) ; if ( jsseDomain == null ) { throw SecurityLogger . ROOT_LOGGER . unableToLocateJSSEConfig ( legacyJSSEConfig ) ; } final TrustManager [ ] trustManagers = jsseDomain . getTrustManagers ( ) ; if ( trustManagers == null ) { throw SecurityLogger . ROOT_LOGGER . unableToLocateComponentInJSSEDomain ( "TrustManager" , legacyJSSEConfig ) ; } for ( TrustManager trustManager : trustManagers ) { if ( trustManager instanceof X509ExtendedTrustManager ) return trustManager ; } throw SecurityLogger . ROOT_LOGGER . expectedManagerTypeNotFound ( "TrustManager" , X509ExtendedTrustManager . class . getSimpleName ( ) , legacyJSSEConfig ) ; } ; } } ; return new BasicResourceDefinition ( Constants . ELYTRON_TRUST_MANAGER , addHandler , attributes , TRUST_MANAGER_RUNTIME_CAPABILITY ) ;


signature:
public class CNNameParser { /** * Returns a CompoundName given a string in INS syntax .
 * @ param name The non - null string representation of the name .
 * @ return a non - null CompoundName */
public Name parse ( String name ) throws NamingException { } }

implementation: Vector comps = insStringToStringifiedComps ( name ) ; return new CNCompoundName ( comps . elements ( ) ) ;


signature:
public class CNNameParser { /** * Creates a NameComponent [ ] from a Name structure .
 * Used by CNCtx to convert the input Name arg into a NameComponent [ ] .
 * @ param name a CompoundName or a CompositeName ;
 * each component must be the stringified form of a NameComponent . */
static NameComponent [ ] nameToCosName ( Name name ) throws InvalidNameException { } }

implementation: int len = name . size ( ) ; if ( len == 0 ) { return new NameComponent [ 0 ] ; } NameComponent [ ] answer = new NameComponent [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { answer [ i ] = parseComponent ( name . get ( i ) ) ; } return answer ;


signature:
public class CNNameParser { /** * Returns the INS stringified form of a NameComponent [ ] .
 * Used by CNCtx . getNameInNamespace ( ) , CNCompoundName . toString ( ) . */
static String cosNameToInsString ( NameComponent [ ] cname ) { } }

implementation: StringBuffer str = new StringBuffer ( ) ; for ( int i = 0 ; i < cname . length ; i ++ ) { if ( i > 0 ) { str . append ( compSeparator ) ; } str . append ( stringifyComponent ( cname [ i ] ) ) ; } return str . toString ( ) ;


signature:
public class CNNameParser { /** * Creates a CompositeName from a NameComponent [ ] .
 * Used by ExceptionMapper and CNBindingEnumeration to convert
 * a NameComponent [ ] into a composite name . */
static Name cosNameToName ( NameComponent [ ] cname ) { } }

implementation:
Name nm = new CompositeName ( ) ; for ( int i = 0 ; cname != null && i < cname . length ; i ++ ) { try { nm . add ( stringifyComponent ( cname [ i ] ) ) ; } catch ( InvalidNameException e ) { // ignore
} } return nm ;


signature:
public class CNNameParser { /** * Converts an INS - syntax string name into a Vector in which
 * each element of the vector contains a stringified form of
 * a NameComponent . */
private static Vector insStringToStringifiedComps ( String str ) throws InvalidNameException { } }

implementation:
int len = str . length ( ) ; Vector components = new Vector ( 10 ) ; char [ ] id = new char [ len ] ; char [ ] kind = new char [ len ] ; int idCount , kindCount ; boolean idMode ; for ( int i = 0 ; i < len ; ) { idCount = kindCount = 0 ; // reset for new component
idMode = true ; // always start off parsing id
while ( i < len ) { if ( str . charAt ( i ) == compSeparator ) { break ; } else if ( str . charAt ( i ) == escapeChar ) { if ( i + 1 >= len ) { throw IIOPLogger . ROOT_LOGGER . unescapedCharacter ( str ) ; } else if ( isMeta ( str . charAt ( i + 1 ) ) ) { ++ i ; // skip escape and let meta through
if ( idMode ) { id [ idCount ++ ] = str . charAt ( i ++ ) ; } else { kind [ kindCount ++ ] = str . charAt ( i ++ ) ; } } else { throw IIOPLogger . ROOT_LOGGER . invalidEscapedCharacter ( str ) ; } } else if ( idMode && str . charAt ( i ) == kindSeparator ) { // just look for the first kindSeparator
++ i ; // skip kind separator
idMode = false ; } else { if ( idMode ) { id [ idCount ++ ] = str . charAt ( i ++ ) ; } else { kind [ kindCount ++ ] = str . charAt ( i ++ ) ; } } } components . addElement ( stringifyComponent ( new NameComponent ( new String ( id , 0 , idCount ) , new String ( kind , 0 , kindCount ) ) ) ) ; if ( i < len ) { ++ i ; // skip separator
} } return components ;


signature:
public class CNNameParser { /** * Return a NameComponent given its stringified form . */
private static NameComponent parseComponent ( String compStr ) throws InvalidNameException { } }

implementation:
NameComponent comp = new NameComponent ( ) ; int kindSep = - 1 ; int len = compStr . length ( ) ; int j = 0 ; char [ ] newStr = new char [ len ] ; boolean escaped = false ; // Find the kind separator
for ( int i = 0 ; i < len && kindSep < 0 ; i ++ ) { if ( escaped ) { newStr [ j ++ ] = compStr . charAt ( i ) ; escaped = false ; } else if ( compStr . charAt ( i ) == escapeChar ) { if ( i + 1 >= len ) { throw IIOPLogger . ROOT_LOGGER . unescapedCharacter ( compStr ) ; } else if ( isMeta ( compStr . charAt ( i + 1 ) ) ) { escaped = true ; } else { throw IIOPLogger . ROOT_LOGGER . invalidEscapedCharacter ( compStr ) ; } } else if ( compStr . charAt ( i ) == kindSeparator ) { kindSep = i ; } else { newStr [ j ++ ] = compStr . charAt ( i ) ; } } // Set id
comp . id = new String ( newStr , 0 , j ) ; // Set kind
if ( kindSep < 0 ) { comp . kind = "" ; // no kind separator
} else { // unescape kind
j = 0 ; escaped = false ; for ( int i = kindSep + 1 ; i < len ; i ++ ) { if ( escaped ) { newStr [ j ++ ] = compStr . charAt ( i ) ; escaped = false ; } else if ( compStr . charAt ( i ) == escapeChar ) { if ( i + 1 >= len ) { throw IIOPLogger . ROOT_LOGGER . unescapedCharacter ( compStr ) ; } else if ( isMeta ( compStr . charAt ( i + 1 ) ) ) { escaped = true ; } else { throw IIOPLogger . ROOT_LOGGER . invalidEscapedCharacter ( compStr ) ; } } else { newStr [ j ++ ] = compStr . charAt ( i ) ; } } comp . kind = new String ( newStr , 0 , j ) ; } return comp ;


signature:
public class CNNameParser { /** * Returns a string with ' . ' , ' \ ' , ' / ' escaped . Used when
 * stringifying the name into its INS stringified form . */
private static String escape ( String str ) { } }

implementation:
if ( str . indexOf ( kindSeparator ) < 0 && str . indexOf ( compSeparator ) < 0 && str . indexOf ( escapeChar ) < 0 ) { return str ; // no meta characters to escape
} else { int len = str . length ( ) ; int j = 0 ; char [ ] newStr = new char [ len + len ] ; for ( int i = 0 ; i < len ; i ++ ) { if ( isMeta ( str . charAt ( i ) ) ) { newStr [ j ++ ] = escapeChar ; // escape meta character
} newStr [ j ++ ] = str . charAt ( i ) ; } return new String ( newStr , 0 , j ) ; }


signature:
public class SimpleDescribeOperationTransformer { /** * { @ inheritDoc } */
@ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) { } }

implementation: ModelNode legacyOperation = Operations . createDescribeOperation ( this . addressTransformer . transform ( address ) ) ; return new TransformedOperation ( legacyOperation , OperationResultTransformer . ORIGINAL_RESULT ) ;


signature:
public class IRObjectImpl { /** * Unexport this object . */
public void shutdown ( ) { } }

implementation: POA poa = getPOA ( ) ; try { poa . deactivate_object ( poa . reference_to_id ( getReference ( ) ) ) ; } catch ( UserException ex ) { IIOPLogger . ROOT_LOGGER . warnCouldNotDeactivateIRObject ( ex ) ; }


signature:
public class IRObjectImpl { /** * Convert a servant to a reference . */
protected org . omg . CORBA . Object servantToReference ( Servant servant ) { } }

implementation: byte [ ] id = getObjectId ( ) ; try { repository . poa . activate_object_with_id ( id , servant ) ; org . omg . CORBA . Object ref = repository . poa . id_to_reference ( id ) ; return ref ; } catch ( WrongPolicy ex ) { IIOPLogger . ROOT_LOGGER . debug ( "Exception converting CORBA servant to reference" , ex ) ; } catch ( ServantAlreadyActive ex ) { IIOPLogger . ROOT_LOGGER . debug ( "Exception converting CORBA servant to reference" , ex ) ; } catch ( ObjectAlreadyActive ex ) { IIOPLogger . ROOT_LOGGER . debug ( "Exception converting CORBA servant to reference" , ex ) ; } catch ( ObjectNotActive ex ) { IIOPLogger . ROOT_LOGGER . debug ( "Exception converting CORBA servant to reference" , ex ) ; } return null ;


signature:
public class ResourceAdapterDeploymentService { /** * The stop ( ) call doesn ' t do that so it ' s probably not needed */
private void cleanupStartAsync ( final StartContext context , final String deploymentName , final Throwable cause , final ServiceName duServiceName , final ClassLoader toUse ) { } }

implementation: ExecutorService executorService = getLifecycleExecutorService ( ) ; Runnable r = new Runnable ( ) { @ Override public void run ( ) { ClassLoader old = WildFlySecurityManager . getCurrentContextClassLoaderPrivileged ( ) ; try { WritableServiceBasedNamingStore . pushOwner ( duServiceName ) ; WildFlySecurityManager . setCurrentContextClassLoaderPrivileged ( toUse ) ; unregisterAll ( deploymentName ) ; } finally { try { context . failed ( ConnectorLogger . ROOT_LOGGER . failedToStartRaDeployment ( cause , deploymentName ) ) ; } finally { WildFlySecurityManager . setCurrentContextClassLoaderPrivileged ( old ) ; WritableServiceBasedNamingStore . popOwner ( ) ; } } } } ; try { executorService . execute ( r ) ; } catch ( RejectedExecutionException e ) { r . run ( ) ; } finally { context . asynchronous ( ) ; }


signature:
public class ElytronSecurityManager { /** * Attempt to authenticate and authorize an username with the specified password evidence .
 * @ param username the username being authenticated .
 * @ param password the password to be verified .
 * @ return a reference to the { @ link SecurityIdentity } if the user was successfully authenticated and authorized ;
 * { @ code null } otherwise . */
private SecurityIdentity authenticate ( final String username , final String password ) { } }

implementation:
ServerAuthenticationContext context = this . securityDomain . createNewAuthenticationContext ( ) ; PasswordGuessEvidence evidence = null ; try { if ( password == null ) { if ( username == null ) { if ( context . authorizeAnonymous ( ) ) { context . succeed ( ) ; return context . getAuthorizedIdentity ( ) ; } else { context . fail ( ) ; return null ; } } else { // treat a non - null user name with a null password as a auth failure
context . fail ( ) ; return null ; } } context . setAuthenticationName ( username ) ; evidence = new PasswordGuessEvidence ( password . toCharArray ( ) ) ; if ( context . verifyEvidence ( evidence ) ) { if ( context . authorize ( ) ) { context . succeed ( ) ; return context . getAuthorizedIdentity ( ) ; } else { context . fail ( ) ; MessagingLogger . ROOT_LOGGER . failedAuthorization ( username ) ; } } else { context . fail ( ) ; MessagingLogger . ROOT_LOGGER . failedAuthentication ( username ) ; } } catch ( IllegalArgumentException | IllegalStateException | RealmUnavailableException e ) { context . fail ( ) ; MessagingLogger . ROOT_LOGGER . failedAuthenticationWithException ( e , username , e . getMessage ( ) ) ; } finally { if ( evidence != null ) { evidence . destroy ( ) ; } } return null ;


signature:
public class GetDataSourceClassInfoOperationHandler { /** * Check whether the types that JCA Injection knows .
 * @ see Injection . findMethod ( )
 * @ param clz the class
 * @ return whether it is understandable */
private static boolean isTypeMatched ( Class < ? > clz ) { } }

implementation: if ( clz . equals ( String . class ) ) { return true ; } else if ( clz . equals ( byte . class ) || clz . equals ( Byte . class ) ) { return true ; } else if ( clz . equals ( short . class ) || clz . equals ( Short . class ) ) { return true ; } else if ( clz . equals ( int . class ) || clz . equals ( Integer . class ) ) { return true ; } else if ( clz . equals ( long . class ) || clz . equals ( Long . class ) ) { return true ; } else if ( clz . equals ( float . class ) || clz . equals ( Float . class ) ) { return true ; } else if ( clz . equals ( double . class ) || clz . equals ( Double . class ) ) { return true ; } else if ( clz . equals ( boolean . class ) || clz . equals ( Boolean . class ) ) { return true ; } else if ( clz . equals ( char . class ) || clz . equals ( Character . class ) ) { return true ; } else if ( clz . equals ( InetAddress . class ) ) { return true ; } else if ( clz . equals ( Class . class ) ) { return true ; } else if ( clz . equals ( Properties . class ) ) { return true ; } return false ;


signature:
public class WildFlyBindingRegistry { /** * SPI contract for this method */
@ Override public Object lookup ( String name ) { } }

implementation: final ContextNames . BindInfo bindInfo = ContextNames . bindInfoFor ( name ) ; ServiceController < ? > bindingService = container . getService ( bindInfo . getBinderServiceName ( ) ) ; if ( bindingService == null ) { return null ; } ManagedReferenceFactory managedReferenceFactory = ManagedReferenceFactory . class . cast ( bindingService . getValue ( ) ) ; return managedReferenceFactory . getReference ( ) . getInstance ( ) ;


signature:
public class WildFlyBindingRegistry { /** * Unbind the resource and wait until the corresponding binding service is effectively removed . */
@ Override public void unbind ( String name ) { } }

implementation:
if ( name == null || name . isEmpty ( ) ) { throw MessagingLogger . ROOT_LOGGER . cannotUnbindJndiName ( ) ; } final ContextNames . BindInfo bindInfo = ContextNames . bindInfoFor ( name ) ; ServiceController < ? > bindingService = container . getService ( bindInfo . getBinderServiceName ( ) ) ; if ( bindingService == null ) { ROOT_LOGGER . debugf ( "Cannot unbind %s since no binding exists with that name" , name ) ; return ; } // remove the binding service
bindingService . setMode ( ServiceController . Mode . REMOVE ) ; final StabilityMonitor monitor = new StabilityMonitor ( ) ; monitor . addController ( bindingService ) ; try { monitor . awaitStability ( ) ; ROOT_LOGGER . unboundJndiName ( bindInfo . getAbsoluteJndiName ( ) ) ; } catch ( InterruptedException e ) { ROOT_LOGGER . failedToUnbindJndiName ( name , 5 , SECONDS . toString ( ) . toLowerCase ( Locale . US ) ) ; } finally { monitor . removeController ( bindingService ) ; }


signature:
public class BeanUtils { /** * Instantiate bean .
 * @ param beanConfig the bean metadata config , must not be null
 * @ param beanInfo the bean info , can be null if enough info
 * @ param index the reflection index , must not be null
 * @ param module the current CL module , must not be null
 * @ return new bean instance
 * @ throws Throwable for any error */
public static Object instantiateBean ( BeanMetaDataConfig beanConfig , BeanInfo beanInfo , DeploymentReflectionIndex index , Module module ) throws Throwable { } }

implementation:
Joinpoint instantiateJoinpoint = null ; ValueConfig [ ] parameters = new ValueConfig [ 0 ] ; String [ ] types = Configurator . NO_PARAMS_TYPES ; ConstructorConfig ctorConfig = beanConfig . getConstructor ( ) ; if ( ctorConfig != null ) { parameters = ctorConfig . getParameters ( ) ; types = Configurator . getTypes ( parameters ) ; String factoryClass = ctorConfig . getFactoryClass ( ) ; FactoryConfig factory = ctorConfig . getFactory ( ) ; if ( factoryClass != null || factory != null ) { String factoryMethod = ctorConfig . getFactoryMethod ( ) ; if ( factoryMethod == null ) throw PojoLogger . ROOT_LOGGER . missingFactoryMethod ( beanConfig ) ; if ( factoryClass != null ) { // static factory
Class < ? > factoryClazz = Class . forName ( factoryClass , false , module . getClassLoader ( ) ) ; Method method = Configurator . findMethod ( index , factoryClazz , factoryMethod , types , true , true , true ) ; MethodJoinpoint mj = new MethodJoinpoint ( method ) ; mj . setTarget ( new ImmediateValue < Object > ( null ) ) ; // null , since this is static call
mj . setParameters ( parameters ) ; instantiateJoinpoint = mj ; } else if ( factory != null ) { ReflectionJoinpoint rj = new ReflectionJoinpoint ( factory . getBeanInfo ( ) , factoryMethod , types ) ; // null type is ok , as this should be plain injection
rj . setTarget ( new ImmediateValue < Object > ( factory . getValue ( null ) ) ) ; rj . setParameters ( parameters ) ; instantiateJoinpoint = rj ; } } } // plain bean ' s ctor
if ( instantiateJoinpoint == null ) { if ( beanInfo == null ) throw new StartException ( PojoLogger . ROOT_LOGGER . missingBeanInfo ( beanConfig ) ) ; Constructor ctor = ( types . length == 0 ) ? beanInfo . getConstructor ( ) : beanInfo . findConstructor ( types ) ; ConstructorJoinpoint constructorJoinpoint = new ConstructorJoinpoint ( ctor ) ; constructorJoinpoint . setParameters ( parameters ) ; instantiateJoinpoint = constructorJoinpoint ; } return instantiateJoinpoint . dispatch ( ) ;


signature:
public class BeanUtils { /** * Configure bean .
 * @ param beanConfig the bean metadata config , must not be null
 * @ param beanInfo the bean info , can be null if enough info
 * @ param module the current CL module , must not be null
 * @ param bean the bean instance
 * @ param nullify do we nullify property
 * @ throws Throwable for any error */
public static void configure ( BeanMetaDataConfig beanConfig , BeanInfo beanInfo , Module module , Object bean , boolean nullify ) throws Throwable { } }

implementation: Set < PropertyConfig > properties = beanConfig . getProperties ( ) ; if ( properties != null ) { List < PropertyConfig > used = new ArrayList < PropertyConfig > ( ) ; for ( PropertyConfig pc : properties ) { try { configure ( beanInfo , module , bean , pc , nullify ) ; used . add ( pc ) ; } catch ( Throwable t ) { if ( nullify == false ) { for ( PropertyConfig upc : used ) { try { configure ( beanInfo , module , bean , upc , true ) ; } catch ( Throwable ignored ) { } } throw new StartException ( t ) ; } } } }


signature:
public class BeanUtils { /** * Dispatch lifecycle joinpoint .
 * @ param beanInfo the bean info
 * @ param bean the bean instance
 * @ param config the lifecycle config
 * @ param defaultMethod the default method
 * @ throws Throwable for any error */
public static void dispatchLifecycleJoinpoint ( BeanInfo beanInfo , Object bean , LifecycleConfig config , String defaultMethod ) throws Throwable { } }

implementation: if ( config != null && config . isIgnored ( ) ) return ; Joinpoint joinpoint = createJoinpoint ( beanInfo , bean , config , defaultMethod ) ; if ( joinpoint != null ) joinpoint . dispatch ( ) ;


signature:
public class EJBClientDescriptorMetaData { /** * Adds an outbound connection reference used by a remoting receiver in the client context represented
 * by this { @ link EJBClientDescriptorMetaData }
 * @ param outboundConnectionRef The name of the outbound connection . Cannot be null or empty string . */
public RemotingReceiverConfiguration addRemotingReceiverConnectionRef ( final String outboundConnectionRef ) { } }

implementation: if ( outboundConnectionRef == null || outboundConnectionRef . trim ( ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "Cannot add a remoting receiver which references a null/empty outbound connection" ) ; } final RemotingReceiverConfiguration remotingReceiverConfiguration = new RemotingReceiverConfiguration ( outboundConnectionRef ) ; this . remotingReceiverConfigurations . put ( outboundConnectionRef , remotingReceiverConfiguration ) ; return remotingReceiverConfiguration ;


signature:
public class ServiceReferenceObjectFactory { /** * Create a reference to a sub class of { @ link ServiceReferenceObjectFactory } that injects the value of the given service . */
public static Reference createReference ( final ServiceName service , Class < ? extends ServiceReferenceObjectFactory > factory ) { } }

implementation: return ModularReference . create ( Context . class , new ServiceNameRefAdr ( "srof" , service ) , factory ) ;


signature:
public class ServiceReferenceObjectFactory { /** * Handles the service reference . The parameters are the same as
 * { @ link javax . naming . spi . ObjectFactory # getObjectInstance ( Object , Name , Context , Hashtable ) } , but with the addition of the service value as
 * the first parameter . */
public Object getObjectInstance ( Object serviceValue , Object obj , Name name , Context nameCtx , Hashtable < ? , ? > environment ) throws Exception { } }

implementation: return serviceValue ;


signature:
public class NamespaceContextSelector { /** * Get the current context selector for the current thread .
 * @ return The current context selector . */
public static NamespaceContextSelector getCurrentSelector ( ) { } }

implementation: NamespaceContextSelector selector = currentSelector . peek ( ) ; if ( selector != null ) { return selector ; } return defaultSelector ;


signature:
public class BeanMetaDataConfig { /** * Get MC bean name .
 * @ param name the original bean name
 * @ param state the state
 * @ return bean service name */
public static ServiceName toBeanName ( String name , BeanState state ) { } }

implementation: if ( state == null ) state = BeanState . INSTALLED ; return JBOSS_POJO . append ( name ) . append ( state . name ( ) ) ;


signature:
public class BeanMetaDataConfig { /** * To instances name .
 * @ param clazz the class
 * @ param state the bean state
 * @ return unique instance name */
public static ServiceName toInstancesName ( Class < ? > clazz , BeanState state ) { } }

implementation: String clName ; ClassLoader classLoader = clazz . getClassLoader ( ) ; if ( classLoader != null ) clName = classLoader . toString ( ) ; else clName = "SystemClassLoader" ; if ( state == null ) state = BeanState . INSTALLED ; return JBOSS_POJO . append ( clName , clazz . getName ( ) , state . name ( ) ) ;


signature:
public class Indices { /** * Determines a list of classes the given annotation instances are defined on . If an annotation instance is not defined on a
 * class ( e . g . on a member ) this annotation instance is not reflected anyhow in the resulting list . */
public static List < ClassInfo > getAnnotatedClasses ( List < AnnotationInstance > instances ) { } }

implementation: List < ClassInfo > result = new ArrayList < ClassInfo > ( ) ; for ( AnnotationInstance instance : instances ) { AnnotationTarget target = instance . target ( ) ; if ( target instanceof ClassInfo ) { result . add ( ( ClassInfo ) target ) ; } } return result ;


signature:
public class EEApplicationClasses { /** * Look for a class description in all available modules .
 * @ param name The class to lookup
 * @ return */
public EEModuleClassDescription getClassByName ( String name ) { } }

implementation: for ( EEModuleDescription module : availableModules ) { final EEModuleClassDescription desc = module . getClassDescription ( name ) ; if ( desc != null ) { return desc ; } } return null ;


signature:
public class SessionBeanComponentDescriptionFactory { /** * Process annotations and merge any available metadata at the same time . */
@ Override protected void processAnnotations ( final DeploymentUnit deploymentUnit , final CompositeIndex compositeIndex ) throws DeploymentUnitProcessingException { } }

implementation:
if ( MetadataCompleteMarker . isMetadataComplete ( deploymentUnit ) ) { return ; } // Find and process any @ Stateless bean annotations
final List < AnnotationInstance > slsbAnnotations = compositeIndex . getAnnotations ( STATELESS_ANNOTATION ) ; if ( ! slsbAnnotations . isEmpty ( ) ) { processSessionBeans ( deploymentUnit , slsbAnnotations , SessionBeanComponentDescription . SessionBeanType . STATELESS ) ; } // Find and process any @ Stateful bean annotations
final List < AnnotationInstance > sfsbAnnotations = compositeIndex . getAnnotations ( STATEFUL_ANNOTATION ) ; if ( ! sfsbAnnotations . isEmpty ( ) ) { processSessionBeans ( deploymentUnit , sfsbAnnotations , SessionBeanComponentDescription . SessionBeanType . STATEFUL ) ; } // Find and process any @ Singleton bean annotations
final List < AnnotationInstance > sbAnnotations = compositeIndex . getAnnotations ( SINGLETON_ANNOTATION ) ; if ( ! sbAnnotations . isEmpty ( ) ) { processSessionBeans ( deploymentUnit , sbAnnotations , SessionBeanComponentDescription . SessionBeanType . SINGLETON ) ; }


signature:
public class SessionBeanComponentDescriptionFactory { /** * Returns true if the passed < code > sessionBeanClass < / code > meets the requirements set by the EJB3 spec about
 * bean implementation classes . The passed < code > sessionBeanClass < / code > must not be an interface and must be public
 * and not final and not abstract . If it passes these requirements then this method returns true . Else it returns false .
 * @ param sessionBeanClass The session bean class
 * @ return */
private static boolean assertSessionBeanClassValidity ( final ClassInfo sessionBeanClass ) { } }

implementation:
final short flags = sessionBeanClass . flags ( ) ; final String className = sessionBeanClass . name ( ) . toString ( ) ; // must * not * be an interface
if ( Modifier . isInterface ( flags ) ) { EjbLogger . DEPLOYMENT_LOGGER . sessionBeanClassCannotBeAnInterface ( className ) ; return false ; } // bean class must be public , must * not * be abstract or final
if ( ! Modifier . isPublic ( flags ) || Modifier . isAbstract ( flags ) || Modifier . isFinal ( flags ) ) { EjbLogger . DEPLOYMENT_LOGGER . sessionBeanClassMustBePublicNonAbstractNonFinal ( className ) ; return false ; } // valid class
return true ;


signature:
public class EjbContextJndiBindingProcessor { /** * { @ inheritDoc } * */
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEResourceReferenceProcessorRegistry registry = deploymentUnit . getAttachment ( Attachments . RESOURCE_REFERENCE_PROCESSOR_REGISTRY ) ; // setup ejb context jndi handlers
registry . registerResourceReferenceProcessor ( new EjbContextResourceReferenceProcessor ( EJBContext . class ) ) ; registry . registerResourceReferenceProcessor ( new EjbContextResourceReferenceProcessor ( SessionContext . class ) ) ; registry . registerResourceReferenceProcessor ( new EjbContextResourceReferenceProcessor ( EntityContext . class ) ) ; registry . registerResourceReferenceProcessor ( new EjbContextResourceReferenceProcessor ( MessageDrivenContext . class ) ) ; final EEModuleDescription eeModuleDescription = deploymentUnit . getAttachment ( Attachments . EE_MODULE_DESCRIPTION ) ; final Collection < ComponentDescription > componentConfigurations = eeModuleDescription . getComponentDescriptions ( ) ; if ( componentConfigurations == null || componentConfigurations . isEmpty ( ) ) { return ; } for ( ComponentDescription componentConfiguration : componentConfigurations ) { final CompositeIndex index = deploymentUnit . getAttachment ( org . jboss . as . server . deployment . Attachments . COMPOSITE_ANNOTATION_INDEX ) ; if ( index != null ) { processComponentConfig ( componentConfiguration ) ; } }


signature:
public class EarSecurityDeployer { /** * { @ inheritDoc } */
@ Override protected JaccService < EarMetaData > createService ( String contextId , EarMetaData metaData , Boolean standalone ) { } }

implementation: return new EarJaccService ( contextId , metaData , standalone ) ;


signature:
public class PersistenceUnitParseProcessor { /** * Eliminate duplicate PU definitions from clustering the deployment ( first definition will win )
 * JPA 8.2 A persistence unit must have a name . Only one persistence unit of any given name must be defined
 * within a single EJB - JAR file , within a single WAR file , within a single application client jar , or within
 * an EAR . See Section 8.2.2 , “ Persistence Unit Scope ” .
 * @ param listPUHolders
 * @ return */
private PersistenceUnitMetadataHolder normalize ( List < PersistenceUnitMetadataHolder > listPUHolders ) { } }

implementation:
// eliminate duplicates ( keeping the first instance of each PU by name )
Map < String , PersistenceUnitMetadata > flattened = new HashMap < String , PersistenceUnitMetadata > ( ) ; for ( PersistenceUnitMetadataHolder puHolder : listPUHolders ) { for ( PersistenceUnitMetadata pu : puHolder . getPersistenceUnits ( ) ) { if ( ! flattened . containsKey ( pu . getPersistenceUnitName ( ) ) ) { flattened . put ( pu . getPersistenceUnitName ( ) , pu ) ; } else { PersistenceUnitMetadata first = flattened . get ( pu . getPersistenceUnitName ( ) ) ; PersistenceUnitMetadata duplicate = pu ; ROOT_LOGGER . duplicatePersistenceUnitDefinition ( duplicate . getPersistenceUnitName ( ) , first . getScopedPersistenceUnitName ( ) , duplicate . getScopedPersistenceUnitName ( ) ) ; } } } PersistenceUnitMetadataHolder holder = new PersistenceUnitMetadataHolder ( new ArrayList < PersistenceUnitMetadata > ( flattened . values ( ) ) ) ; return holder ;


signature:
public class PersistenceUnitParseProcessor { /** * old as6 names looked like : persistence . unit : unitName = ejb3 _ ext _ propagation . ear / lib / ejb3 _ ext _ propagation . jar # CTS - EXT - UNIT */
public static String createBeanName ( DeploymentUnit deploymentUnit , String persistenceUnitName ) { } }

implementation:
// persistenceUnitName must be a simple name
if ( persistenceUnitName . indexOf ( '/' ) != - 1 ) { throw JpaLogger . ROOT_LOGGER . invalidPersistenceUnitName ( persistenceUnitName , '/' ) ; } if ( persistenceUnitName . indexOf ( '#' ) != - 1 ) { throw JpaLogger . ROOT_LOGGER . invalidPersistenceUnitName ( persistenceUnitName , '#' ) ; } String unitName = getScopedDeploymentUnitPath ( deploymentUnit ) + "#" + persistenceUnitName ; return unitName ;