signature:
public class ManagementUtil { /** * Utility for converting camel case based ActiveMQ formats to WildFly standards . */
static ModelNode convertSecurityRole ( final ModelNode camelCase ) { } }

implementation: final ModelNode result = new ModelNode ( ) ; result . setEmptyList ( ) ; if ( camelCase . isDefined ( ) ) { for ( ModelNode role : camelCase . asList ( ) ) { final ModelNode roleNode = result . add ( ) ; for ( Property prop : role . asPropertyList ( ) ) { String key = prop . getName ( ) ; if ( "createDurableQueue" . equals ( key ) ) { key = SecurityRoleDefinition . CREATE_DURABLE_QUEUE . getName ( ) ; } else if ( "deleteDurableQueue" . equals ( key ) ) { key = SecurityRoleDefinition . DELETE_DURABLE_QUEUE . getName ( ) ; } else if ( "createNonDurableQueue" . equals ( key ) ) { key = SecurityRoleDefinition . CREATE_NON_DURABLE_QUEUE . getName ( ) ; } else if ( "deleteNonDurableQueue" . equals ( key ) ) { key = SecurityRoleDefinition . DELETE_NON_DURABLE_QUEUE . getName ( ) ; } roleNode . get ( key ) . set ( prop . getValue ( ) ) ; } } } return result ;


signature:
public class AbstractPojoPhase { /** * Consider the uninstalls .
 * This method is here to be able to override
 * the behavior after installs failed .
 * e . g . perhaps only running uninstalls from the index .
 * By default we run all uninstalls in the case
 * at least one install failed .
 * @ param uninstalls the uninstalls
 * @ param index current installs index */
protected void considerUninstalls ( List < Joinpoint > uninstalls , int index ) { } }

implementation: if ( uninstalls == null ) return ; for ( int j = Math . min ( index , uninstalls . size ( ) - 1 ) ; j >= 0 ; j -- ) { try { uninstalls . get ( j ) . dispatch ( ) ; } catch ( Throwable t ) { PojoLogger . ROOT_LOGGER . ignoreUninstallError ( uninstalls . get ( j ) , t ) ; } }


signature:
public class ClassAnalysis { /** * Analyze the given class , and return the analysis .
 * public static ClassAnalysis getClassAnalysis ( Class cls )
 * throws RMIIIOPViolationException
 * if ( cls = = null )
 * throw new IllegalArgumentException ( " Cannot analyze NULL class . " ) ;
 * if ( cls = = java . lang . String . class | | cls = = java . lang . Object . class | |
 * cls = = java . lang . Class . class | | cls = = java . io . Serializable . class | |
 * cls = = java . io . Externalizable . class | |
 * cls = = java . rmi . Remote . class )
 * throw new IllegalArgumentException ( " Cannot analyze special class : " +
 * cls . getName ( ) ) ;
 * if ( cls . isPrimitive ( ) )
 * return PrimitiveAnalysis . getPrimitiveAnalysis ( cls ) ;
 * if ( cls . isInterface ( ) & & java . rmi . Remote . class . isAssignableFrom ( cls ) )
 * return InterfaceAnalysis . getInterfaceAnalysis ( cls ) ;
 * / / TODO
 * throw new RuntimeException ( " ClassAnalysis . getClassAnalysis ( ) TODO " ) ; */
private static String javaNameOfClass ( Class cls ) { } }

implementation: if ( cls == null ) throw IIOPLogger . ROOT_LOGGER . cannotAnalyzeNullClass ( ) ; String s = cls . getName ( ) ; return s . substring ( s . lastIndexOf ( '.' ) + 1 ) ;


signature:
public class FileTimerPersistence { /** * Returns either the loaded entity or the most recent version of the entity that has
 * been persisted in this transaction . */
private TimerImpl mostRecentEntityVersion ( final TimerImpl timerImpl ) { } }

implementation: try { final int status = ContextTransactionManager . getInstance ( ) . getStatus ( ) ; if ( status == Status . STATUS_UNKNOWN || status == Status . STATUS_NO_TRANSACTION ) { return timerImpl ; } final String key = timerTransactionKey ( timerImpl ) ; TimerImpl existing = ( TimerImpl ) transactionSynchronizationRegistry . getValue ( ) . getResource ( key ) ; return existing != null ? existing : timerImpl ; } catch ( SystemException e ) { throw new RuntimeException ( e ) ; }


signature:
public class FileTimerPersistence { /** * Gets the timer map , loading from the persistent store if necessary . Should be called under lock
 * @ param timedObjectId The timed object id
 * @ return The timers for the object */
private Map < String , TimerImpl > getTimers ( final String timedObjectId , final TimerServiceImpl timerService ) { } }

implementation: return loadTimersFromFile ( timedObjectId , timerService ) ;


signature:
public class FileTimerPersistence { /** * Gets the directory for a given timed object , making sure it exists .
 * @ param timedObjectId The timed object
 * @ return The directory */
private String getDirectory ( String timedObjectId ) { } }

implementation: String dirName = directories . get ( timedObjectId ) ; if ( dirName == null ) { dirName = baseDir . getAbsolutePath ( ) + File . separator + timedObjectId . replace ( File . separator , "-" ) ; File file = new File ( dirName ) ; if ( ! file . exists ( ) ) { if ( ! file . mkdirs ( ) ) { EJB3_TIMER_LOGGER . failToCreateDirectoryForPersistTimers ( file ) ; } } directories . put ( timedObjectId , dirName ) ; } return dirName ;


signature:
public class ParsedServiceDeploymentProcessor { /** * Process a deployment for JbossService configuration . Will install a { @ code JBossService } for each configured service .
 * @ param phaseContext the deployment unit context
 * @ throws DeploymentUnitProcessingException */
@ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final JBossServiceXmlDescriptor serviceXmlDescriptor = deploymentUnit . getAttachment ( JBossServiceXmlDescriptor . ATTACHMENT_KEY ) ; if ( serviceXmlDescriptor == null ) { // Skip deployments without a service xml descriptor
return ; } // assert module
final Module module = deploymentUnit . getAttachment ( Attachments . MODULE ) ; if ( module == null ) throw SarLogger . ROOT_LOGGER . failedToGetAttachment ( "module" , deploymentUnit ) ; // assert reflection index
final DeploymentReflectionIndex reflectionIndex = deploymentUnit . getAttachment ( Attachments . REFLECTION_INDEX ) ; if ( reflectionIndex == null ) throw SarLogger . ROOT_LOGGER . failedToGetAttachment ( "reflection index" , deploymentUnit ) ; // install services
final ClassLoader classLoader = module . getClassLoader ( ) ; final List < JBossServiceConfig > serviceConfigs = serviceXmlDescriptor . getServiceConfigs ( ) ; final ServiceTarget target = phaseContext . getServiceTarget ( ) ; final Map < String , ServiceComponentInstantiator > serviceComponents = deploymentUnit . getAttachment ( ServiceAttachments . SERVICE_COMPONENT_INSTANTIATORS ) ; for ( final JBossServiceConfig serviceConfig : serviceConfigs ) { addServices ( target , serviceConfig , classLoader , reflectionIndex , serviceComponents != null ? serviceComponents . get ( serviceConfig . getName ( ) ) : null , phaseContext ) ; }


signature:
public class Sanitizers { /** * creates and returns a { @ link Sanitizer } instance that only operates on
 * files that end with a { @ code . properties } suffix .
 * @ param pattern { @ link WildcardPattern } compatible pattern to search for
 * @ param replacement text content to replace matches with
 * @ return { @ link Sanitizer } that only operates on files with names ending with { @ code . properties } .
 * @ throws Exception */
public static Sanitizer pattern ( String pattern , String replacement ) throws Exception { } }

implementation: return new PatternSanitizer ( pattern , replacement , Filters . suffix ( ".properties" ) ) ;


signature:
public class CMResourceResourceDefinition { /** * { @ inheritDoc } */
@ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { } }

implementation:
ReloadRequiredWriteAttributeHandler reloadWrtiteHandler = new ReloadRequiredWriteAttributeHandler ( JNDI_NAME , CM_TABLE_NAME , CM_TABLE_BATCH_SIZE , CM_TABLE_IMMEDIATE_CLEANUP ) ; resourceRegistration . registerReadWriteAttribute ( CM_TABLE_NAME , null , reloadWrtiteHandler ) ; resourceRegistration . registerReadWriteAttribute ( CM_TABLE_BATCH_SIZE , null , reloadWrtiteHandler ) ; resourceRegistration . registerReadWriteAttribute ( CM_TABLE_IMMEDIATE_CLEANUP , null , reloadWrtiteHandler ) ; // This comes from the address
resourceRegistration . registerReadOnlyAttribute ( JNDI_NAME , ReadResourceNameOperationStepHandler . INSTANCE ) ;


signature:
public class StatefulRemoveInterceptor { /** * Returns true if the passed < code > exceptionClass < / code > is an application exception . Else returns false .
 * @ param ejbComponent The EJB component
 * @ param exceptionClass The exception class
 * @ return */
private boolean isApplicationException ( final EJBComponent ejbComponent , final Class < ? > exceptionClass , final Method invokedMethod ) { } }

implementation: return ejbComponent . getApplicationException ( exceptionClass , invokedMethod ) != null ;


signature:
public class NamingEventCoordinator { /** * Add a listener to the coordinator with a given target name and event scope . This information is used when an
 * event is fired to determine whether or not to fire this listener .
 * @ param target The target name to lister
 * @ param scope The event scope
 * @ param namingListener The listener */
synchronized void addListener ( final String target , final int scope , final NamingListener namingListener ) { } }

implementation:
final TargetScope targetScope = new TargetScope ( target , scope ) ; // Do we have a holder for this listener
ListenerHolder holder = holdersByListener . get ( namingListener ) ; if ( holder == null ) { holder = new ListenerHolder ( namingListener , targetScope ) ; final Map < NamingListener , ListenerHolder > byListenerCopy = new FastCopyHashMap < NamingListener , ListenerHolder > ( holdersByListener ) ; byListenerCopy . put ( namingListener , holder ) ; holdersByListener = byListenerCopy ; } else { holder . addTarget ( targetScope ) ; } List < ListenerHolder > holdersForTarget = holdersByTarget . get ( targetScope ) ; if ( holdersForTarget == null ) { holdersForTarget = new CopyOnWriteArrayList < ListenerHolder > ( ) ; final Map < TargetScope , List < ListenerHolder > > byTargetCopy = new FastCopyHashMap < TargetScope , List < ListenerHolder > > ( holdersByTarget ) ; byTargetCopy . put ( targetScope , holdersForTarget ) ; holdersByTarget = byTargetCopy ; } holdersForTarget . add ( holder ) ;


signature:
public class NamingEventCoordinator { /** * Remove a listener . Will remove it from all target mappings . Once this method returns , the listener will no longer
 * receive any events .
 * @ param namingListener The listener */
synchronized void removeListener ( final NamingListener namingListener ) { } }

implementation:
// Do we have a holder for this listener
final ListenerHolder holder = holdersByListener . get ( namingListener ) ; if ( holder == null ) { return ; } final Map < NamingListener , ListenerHolder > byListenerCopy = new FastCopyHashMap < NamingListener , ListenerHolder > ( holdersByListener ) ; byListenerCopy . remove ( namingListener ) ; holdersByListener = byListenerCopy ; final Map < TargetScope , List < ListenerHolder > > byTargetCopy = new FastCopyHashMap < TargetScope , List < ListenerHolder > > ( holdersByTarget ) ; for ( TargetScope targetScope : holder . targets ) { final List < ListenerHolder > holders = holdersByTarget . get ( targetScope ) ; holders . remove ( holder ) ; if ( holders . isEmpty ( ) ) { byTargetCopy . remove ( targetScope ) ; } } holdersByTarget = byTargetCopy ;


signature:
public class NamingEventCoordinator { /** * Fire a naming event . An event will be created with the provided information and sent to each listener that matches
 * the target and scope information .
 * @ param context The event context generating the event .
 * @ param name The target name the event represents
 * @ param existingBinding The existing binding at the provided name
 * @ param newBinding The new binding at the provided name
 * @ param type The event type
 * @ param changeInfo The change info for the event
 * @ param scopes The scopes this event should be fired against */
void fireEvent ( final EventContext context , final Name name , final Binding existingBinding , final Binding newBinding , int type , final String changeInfo , final Integer ... scopes ) { } }

implementation:
final String target = name . toString ( ) ; final Set < Integer > scopeSet = new HashSet < Integer > ( Arrays . asList ( scopes ) ) ; final NamingEvent event = new NamingEvent ( context , type , newBinding , existingBinding , changeInfo ) ; final Set < ListenerHolder > holdersToFire = new HashSet < ListenerHolder > ( ) ; // Check for OBJECT _ SCOPE based listeners
if ( scopeSet . contains ( EventContext . OBJECT_SCOPE ) ) { final TargetScope targetScope = new TargetScope ( target , EventContext . OBJECT_SCOPE ) ; final List < ListenerHolder > holders = holdersByTarget . get ( targetScope ) ; if ( holders != null ) { for ( ListenerHolder holder : holders ) { holdersToFire . add ( holder ) ; } } } // Check for ONELEVEL _ SCOPE based listeners
if ( scopeSet . contains ( EventContext . ONELEVEL_SCOPE ) && ! name . isEmpty ( ) ) { final TargetScope targetScope = new TargetScope ( name . getPrefix ( name . size ( ) - 1 ) . toString ( ) , EventContext . ONELEVEL_SCOPE ) ; final List < ListenerHolder > holders = holdersByTarget . get ( targetScope ) ; if ( holders != null ) { for ( ListenerHolder holder : holders ) { holdersToFire . add ( holder ) ; } } } // Check for SUBTREE _ SCOPE based listeners
if ( scopeSet . contains ( EventContext . SUBTREE_SCOPE ) && ! name . isEmpty ( ) ) { for ( int i = 1 ; i < name . size ( ) ; i ++ ) { final Name parentName = name . getPrefix ( i ) ; final TargetScope targetScope = new TargetScope ( parentName . toString ( ) , EventContext . SUBTREE_SCOPE ) ; final List < ListenerHolder > holders = holdersByTarget . get ( targetScope ) ; if ( holders != null ) { for ( ListenerHolder holder : holders ) { holdersToFire . add ( holder ) ; } } } } executor . execute ( new FireEventTask ( holdersToFire , event ) ) ;


signature:
public class Consumers { /** * Returns a consumer that closes its input .
 * @ return a consumer that closes its input . */
public static < T extends AutoCloseable > Consumer < T > close ( ) { } }

implementation: return value -> { try { value . close ( ) ; } catch ( Throwable e ) { ClusteringLogger . ROOT_LOGGER . failedToClose ( e , value ) ; } } ;


signature:
public class ElytronSubjectFactory { /** * { @ inheritDoc } */
public Subject createSubject ( ) { } }

implementation:
// If a authenticationContext was defined on the subsystem use that context , otherwise use capture the current
// configuration .
final Subject subject = this . createSubject ( getAuthenticationContext ( ) ) ; if ( ROOT_LOGGER . isTraceEnabled ( ) ) { ROOT_LOGGER . subject ( subject , Integer . toHexString ( System . identityHashCode ( subject ) ) ) ; } return subject ;


signature:
public class ElytronSubjectFactory { /** * { @ inheritDoc } */
public Subject createSubject ( final String authenticationContextName ) { } }

implementation: AuthenticationContext context ; if ( authenticationContextName != null && ! authenticationContextName . isEmpty ( ) ) { final ServiceContainer container = this . currentServiceContainer ( ) ; final ServiceName authContextServiceName = AUTHENTICATION_CONTEXT_RUNTIME_CAPABILITY . getCapabilityServiceName ( authenticationContextName ) ; context = ( AuthenticationContext ) container . getRequiredService ( authContextServiceName ) . getValue ( ) ; } else { context = getAuthenticationContext ( ) ; } final Subject subject = this . createSubject ( context ) ; if ( ROOT_LOGGER . isTraceEnabled ( ) ) { ROOT_LOGGER . subject ( subject , Integer . toHexString ( System . identityHashCode ( subject ) ) ) ; } return subject ;


signature:
public class ElytronSubjectFactory { /** * Create a { @ link Subject } with the principal and password credential obtained from the authentication configuration
 * that matches the target { @ link URI } .
 * @ param authenticationContext the { @ link AuthenticationContext } used to select a configuration that matches the
 * target { @ link URI } .
 * @ return the constructed { @ link Subject } . It contains a single principal and a { @ link PasswordCredential } . */
private Subject createSubject ( final AuthenticationContext authenticationContext ) { } }

implementation:
final AuthenticationConfiguration configuration = AUTH_CONFIG_CLIENT . getAuthenticationConfiguration ( this . targetURI , authenticationContext ) ; final CallbackHandler handler = AUTH_CONFIG_CLIENT . getCallbackHandler ( configuration ) ; final NameCallback nameCallback = new NameCallback ( "Username: " ) ; final PasswordCallback passwordCallback = new PasswordCallback ( "Password: " , false ) ; final CredentialCallback credentialCallback = new CredentialCallback ( GSSKerberosCredential . class ) ; try { handler . handle ( new Callback [ ] { nameCallback , passwordCallback , credentialCallback } ) ; Subject subject = new Subject ( ) ; // if a GSSKerberosCredential was found , add the enclosed GSSCredential and KerberosTicket to the private set in the Subject .
if ( credentialCallback . getCredential ( ) != null ) { GSSKerberosCredential kerberosCredential = GSSKerberosCredential . class . cast ( credentialCallback . getCredential ( ) ) ; this . addPrivateCredential ( subject , kerberosCredential . getKerberosTicket ( ) ) ; this . addPrivateCredential ( subject , kerberosCredential . getGssCredential ( ) ) ; // use the GSSName to build a kerberos principal and set it in the Subject .
GSSName gssName = kerberosCredential . getGssCredential ( ) . getName ( ) ; subject . getPrincipals ( ) . add ( new KerberosPrincipal ( gssName . toString ( ) ) ) ; } // use the name from the callback , if available , to build a principal and set it in the Subject .
if ( nameCallback . getName ( ) != null ) { subject . getPrincipals ( ) . add ( new NamePrincipal ( nameCallback . getName ( ) ) ) ; } // use the password from the callback , if available , to build a credential and set it as a private credential in the Subject .
if ( passwordCallback . getPassword ( ) != null ) { this . addPrivateCredential ( subject , new PasswordCredential ( nameCallback . getName ( ) , passwordCallback . getPassword ( ) ) ) ; } return subject ; } catch ( Exception e ) { throw new SecurityException ( e ) ; }


signature:
public class ElytronSubjectFactory { /** * Get a reference to the current { @ link ServiceContainer } .
 * @ return a reference to the current { @ link ServiceContainer } . */
private ServiceContainer currentServiceContainer ( ) { } }

implementation: if ( WildFlySecurityManager . isChecking ( ) ) { return AccessController . doPrivileged ( CurrentServiceContainer . GET_ACTION ) ; } return CurrentServiceContainer . getServiceContainer ( ) ;


signature:
public class ElytronSubjectFactory { /** * Add the specified credential to the subject ' s private credentials set .
 * @ param subject the { @ link Subject } to add the credential to .
 * @ param credential a reference to the credential . */
private void addPrivateCredential ( final Subject subject , final Object credential ) { } }

implementation: if ( ! WildFlySecurityManager . isChecking ( ) ) { subject . getPrivateCredentials ( ) . add ( credential ) ; } else { AccessController . doPrivileged ( ( PrivilegedAction < Void > ) ( ) -> { subject . getPrivateCredentials ( ) . add ( credential ) ; return null ; } ) ; }


signature: public class AbstractDataSourceOperations { protected static AgroalConnectionFactoryConfigurationSupplier connectionFactoryConfiguration ( OperationContext context , ModelNode model ) throws OperationFailedException { } }

implementation: AgroalConnectionFactoryConfigurationSupplier configuration = new AgroalConnectionFactoryConfigurationSupplier ( ) ; if ( AbstractDataSourceDefinition . URL_ATTRIBUTE . resolveModelAttribute ( context , model ) . isDefined ( ) ) { configuration . jdbcUrl ( AbstractDataSourceDefinition . URL_ATTRIBUTE . resolveModelAttribute ( context , model ) . asString ( ) ) ; } if ( AbstractDataSourceDefinition . NEW_CONNECTION_SQL_ATTRIBUTE . resolveModelAttribute ( context , model ) . isDefined ( ) ) { configuration . initialSql ( AbstractDataSourceDefinition . NEW_CONNECTION_SQL_ATTRIBUTE . resolveModelAttribute ( context , model ) . asString ( ) ) ; } if ( AbstractDataSourceDefinition . TRANSACTION_ISOLATION_ATTRIBUTE . resolveModelAttribute ( context , model ) . isDefined ( ) ) { configuration . jdbcTransactionIsolation ( TransactionIsolation . valueOf ( AbstractDataSourceDefinition . TRANSACTION_ISOLATION_ATTRIBUTE . resolveModelAttribute ( context , model ) . asString ( ) ) ) ; } if ( AbstractDataSourceDefinition . CONNECTION_PROPERTIES_ATTRIBUTE . resolveModelAttribute ( context , model ) . isDefined ( ) ) { for ( Property jdbcProperty : AbstractDataSourceDefinition . CONNECTION_PROPERTIES_ATTRIBUTE . resolveModelAttribute ( context , model ) . asPropertyList ( ) ) { configuration . jdbcProperty ( jdbcProperty . getName ( ) , jdbcProperty . getValue ( ) . asString ( ) ) ; } } if ( AbstractDataSourceDefinition . USERNAME_ATTRIBUTE . resolveModelAttribute ( context , model ) . isDefined ( ) ) { configuration . principal ( new NamePrincipal ( AbstractDataSourceDefinition . USERNAME_ATTRIBUTE . resolveModelAttribute ( context , model ) . asString ( ) ) ) ; } if ( AbstractDataSourceDefinition . PASSWORD_ATTRIBUTE . resolveModelAttribute ( context , model ) . isDefined ( ) ) { configuration . credential ( new SimplePassword ( AbstractDataSourceDefinition . PASSWORD_ATTRIBUTE . resolveModelAttribute ( context , model ) . asString ( ) ) ) ; } return configuration ;


signature: public class AbstractDataSourceOperations { private static AgroalDataSource getDataSource ( OperationContext context ) throws OperationFailedException { } }

implementation: ServiceRegistry registry = context . getServiceRegistry ( false ) ; String dataSourceName = context . getCurrentAddressValue ( ) ; switch ( context . getCurrentAddress ( ) . getLastElement ( ) . getKey ( ) ) { case DataSourceOperations . DATASOURCE_SERVICE_NAME : ServiceController < ? > controller = registry . getRequiredService ( AbstractDataSourceDefinition . DATA_SOURCE_CAPABILITY . getCapabilityServiceName ( dataSourceName ) ) ; return ( ( AgroalDataSource ) controller . getValue ( ) ) ; case XADataSourceOperations . XADATASOURCE_SERVICE_NAME : ServiceController < ? > xaController = registry . getRequiredService ( AbstractDataSourceDefinition . DATA_SOURCE_CAPABILITY . getCapabilityServiceName ( dataSourceName ) ) ; return ( ( AgroalDataSource ) xaController . getValue ( ) ) ; default : throw AgroalLogger . SERVICE_LOGGER . unknownDatasourceServiceType ( context . getCurrentAddress ( ) . getLastElement ( ) . getKey ( ) ) ; }


signature:
public class ManagedReferenceReleaseInterceptor { /** * { @ inheritDoc } */
public Object processInvocation ( final InterceptorContext context ) throws Exception { } }

implementation: try { return context . proceed ( ) ; } finally { final ManagedReference managedReference = ( ManagedReference ) context . getPrivateData ( ComponentInstance . class ) . getInstanceData ( contextKey ) ; if ( managedReference != null ) { managedReference . release ( ) ; } }


signature:
public class ObjectFactoryBuilder { /** * Create an object factory . If the object parameter is a reference it will attempt to create an { @ link javax . naming . spi . ObjectFactory }
 * from the reference . If the parameter is not a reference , or the reference does not create an { @ link javax . naming . spi . ObjectFactory }
 * it will return { @ code this } as the { @ link javax . naming . spi . ObjectFactory } to use .
 * @ param obj The object bound in the naming context
 * @ param environment The environment information
 * @ return The object factory the object resolves to
 * @ throws NamingException If any problems occur */
public ObjectFactory createObjectFactory ( final Object obj , Hashtable < ? , ? > environment ) throws NamingException { } }

implementation: try { if ( obj instanceof Reference ) { return factoryFromReference ( ( Reference ) obj , environment ) ; } } catch ( Throwable ignored ) { } return this ;


signature:
public class ObjectFactoryBuilder { /** * Create an object instance .
 * @ param ref Object containing reference information
 * @ param name The name relative to nameCtx
 * @ param nameCtx The naming context
 * @ param environment The environment information
 * @ return The object
 * @ throws Exception If any error occur */
public Object getObjectInstance ( final Object ref , final Name name , final Context nameCtx , final Hashtable < ? , ? > environment ) throws Exception { } }

implementation: final ClassLoader classLoader = WildFlySecurityManager . getCurrentContextClassLoaderPrivileged ( ) ; if ( classLoader == null ) { return ref ; } final String factoriesProp = ( String ) environment . get ( Context . OBJECT_FACTORIES ) ; if ( factoriesProp != null ) { final String [ ] classes = factoriesProp . split ( ":" ) ; for ( String className : classes ) { try { final Class < ? > factoryClass = classLoader . loadClass ( className ) ; final ObjectFactory objectFactory = ObjectFactory . class . cast ( factoryClass . newInstance ( ) ) ; final Object result = objectFactory . getObjectInstance ( ref , name , nameCtx , environment ) ; if ( result != null ) { return result ; } } catch ( Throwable ignored ) { } } } return ref ;


signature:
public class MethodAdapter { /** * Calls to Hibernate ORM 5.3 getFlushMode ( ) , will not be changed as the desc will not match ( desc = = " ( ) Ljavax . persistence . FlushModeType ; " ) */
@ Override public void visitMethodInsn ( int opcode , String owner , String name , String desc , boolean itf ) { } }

implementation:
if ( rewriteSessionImplementor && hasSessionImplementor ( desc ) && ( opcode == Opcodes . INVOKESPECIAL || opcode == Opcodes . INVOKEVIRTUAL ) ) { // if we have a user type calling a method from org . hibernate , we rewrite it to use SharedSessionContractImplementor
logger . debugf ( "Deprecated Hibernate51CompatibilityTransformer transformed application classes in '%s', " + "class '%s' is calling method %s.%s, which must be changed to use SharedSessionContractImplementor as parameter." , moduleName , className , owner , name ) ; mv . visitMethodInsn ( opcode , owner , name , replaceSessionImplementor ( desc ) , itf ) ; transformedState . setClassTransformed ( true ) ; } else if ( opcode == Opcodes . INVOKEINTERFACE && ( owner . equals ( "org/hibernate/Session" ) || owner . equals ( "org/hibernate/BasicQueryContract" ) ) && name . equals ( "getFlushMode" ) && desc . equals ( "()Lorg/hibernate/FlushMode;" ) ) { logger . debugf ( "Deprecated Hibernate51CompatibilityTransformer transformed application classes in '%s', " + "class '%s' is calling %s.getFlushMode, which must be changed to call getHibernateFlushMode()." , moduleName , className , owner ) ; name = "getHibernateFlushMode" ; mv . visitMethodInsn ( opcode , owner , name , desc , itf ) ; transformedState . setClassTransformed ( true ) ; } else if ( opcode == Opcodes . INVOKEINTERFACE && owner . equals ( "org/hibernate/Query" ) && name . equals ( "getFirstResult" ) && desc . equals ( "()Ljava/lang/Integer;" ) ) { logger . debugf ( "Deprecated Hibernate51CompatibilityTransformer transformed application classes in '%s', " + "class '%s', is calling org.hibernate.Query.getFirstResult, which must be changed to call getHibernateFirstResult() " + "so null can be returned when the value is uninitialized. Please note that if a negative value was set using " + "org.hibernate.Query.setFirstResult, then getHibernateFirstResult() will return 0." , moduleName , className ) ; name = "getHibernateFirstResult" ; mv . visitMethodInsn ( opcode , owner , name , desc , itf ) ; transformedState . setClassTransformed ( true ) ; } else if ( opcode == Opcodes . INVOKEINTERFACE && owner . equals ( "org/hibernate/Query" ) && name . equals ( "getMaxResults" ) && desc . equals ( "()Ljava/lang/Integer;" ) ) { logger . debugf ( "Deprecated Hibernate51CompatibilityTransformer transformed application classes in '%s', " + "class '%s', is calling org.hibernate.Query.getMaxResults, which must be changed to call getHibernateMaxResults() " + "so that null will be returned when the value is uninitialized or ORM 5.1 org.hibernate.Query#setMaxResults was " + "used to set a value <= 0" , moduleName , className ) ; name = "getHibernateMaxResults" ; mv . visitMethodInsn ( opcode , owner , name , desc , itf ) ; transformedState . setClassTransformed ( true ) ; } else if ( ! disableAmbiguousChanges && opcode == Opcodes . INVOKEINTERFACE && owner . equals ( "org/hibernate/Query" ) && name . equals ( "setFirstResult" ) && desc . equals ( "(I)Lorg/hibernate/Query;" ) ) { logger . debugf ( "Deprecated Hibernate51CompatibilityTransformer transformed application classes in '%s', " + "class '%s', is calling org.hibernate.Query.setFirstResult, which must be changed to call setHibernateFirstResult() " + "so setting a value < 0 results in pagination starting with the 0th row as was done in Hibernate ORM 5.1 " + "(instead of throwing IllegalArgumentException as specified by JPA)." , moduleName , className ) ; name = "setHibernateFirstResult" ; mv . visitMethodInsn ( opcode , owner , name , desc , itf ) ; transformedState . setClassTransformed ( true ) ; } else if ( ! disableAmbiguousChanges && opcode == Opcodes . INVOKEINTERFACE && owner . equals ( "org/hibernate/Query" ) && name . equals ( "setMaxResults" ) && desc . equals ( "(I)Lorg/hibernate/Query;" ) ) { logger . debugf ( "Deprecated Hibernate51CompatibilityTransformer transformed application classes in '%s', " + "class '%s', is calling org.hibernate.Query.setMaxResults, which must be changed to call setHibernateMaxResults() " + "so that values <= 0 are treated the same as uninitialized.  Review Hibernate ORM migration doc " , moduleName , className ) ; name = "setHibernateMaxResults" ; mv . visitMethodInsn ( opcode , owner , name , desc , itf ) ; transformedState . setClassTransformed ( true ) ; } else { mv . visitMethodInsn ( opcode , owner , name , desc , itf ) ; }


signature:
public class SessionBeanComponentDescription { /** * Sets up the transaction management interceptor for all methods of the passed view .
 * @ param view The EJB bean view */
protected static void addTxManagementInterceptorForView ( ViewDescription view ) { } }

implementation:
// add a Tx configurator
view . getConfigurators ( ) . add ( new ViewConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration configuration ) throws DeploymentUnitProcessingException { EJBComponentDescription ejbComponentDescription = ( EJBComponentDescription ) componentConfiguration . getComponentDescription ( ) ; // Add CMT interceptor factory
if ( TransactionManagementType . CONTAINER . equals ( ejbComponentDescription . getTransactionManagementType ( ) ) ) { configuration . addViewInterceptor ( CMTTxInterceptor . FACTORY , InterceptorOrder . View . CMT_TRANSACTION_INTERCEPTOR ) ; } } } ) ;


signature:
public class PrimitiveClassLoaderUtil { /** * First checks if < code > name < / code > is a primitive type . If yes , then returns
 * the corresponding { @ link Class } for that primitive . If it ' s not a primitive
 * then the { @ link Class # forName ( String , boolean , ClassLoader ) } method is invoked , passing
 * it the < code > name < / code > , false and the < code > cl < / code > classloader
 * @ param name The class that has to be loaded
 * @ param cl The { @ link ClassLoader } to use , if < code > name < / code > is * not * a primitive
 * @ return Returns the { @ link Class } corresponding to < code > name < / code >
 * @ throws ClassNotFoundException If the class for < code > name < / code > could not be found
 * @ see ClassLoader # loadClass ( String ) */
public static Class < ? > loadClass ( String name , ClassLoader cl ) throws ClassNotFoundException { } }

implementation:
/* * Handle Primitives */
if ( name . equals ( void . class . getName ( ) ) ) { return void . class ; } if ( name . equals ( byte . class . getName ( ) ) ) { return byte . class ; } if ( name . equals ( short . class . getName ( ) ) ) { return short . class ; } if ( name . equals ( int . class . getName ( ) ) ) { return int . class ; } if ( name . equals ( long . class . getName ( ) ) ) { return long . class ; } if ( name . equals ( char . class . getName ( ) ) ) { return char . class ; } if ( name . equals ( boolean . class . getName ( ) ) ) { return boolean . class ; } if ( name . equals ( float . class . getName ( ) ) ) { return float . class ; } if ( name . equals ( double . class . getName ( ) ) ) { return double . class ; } // Now that we know its not a primitive , lets just allow
// the passed classloader to handle the request .
// Note that we are intentionally using Class . forName ( name , boolean , cl )
// to handle issues with loading array types in Java 6 http : / / bugs . sun . com / view _ bug . do ? bug _ id = 6434149
return Class . forName ( name , false , cl ) ;


signature:
public class QueryName { /** * transform a Hibernate HQL query into something that can be displayed / used for management operations
 * @ param query
 * @ return */
private String displayable ( String query ) { } }

implementation:
if ( query == null || query . length ( ) == 0 ) { return query ; } StringBuilder buff = new StringBuilder ( query ) ; // handle two character transforms first
subst ( buff , SQL_NE , NOT_EQUAL__ ) ; subst ( buff , NE_BANG , BANG_NOT_EQUAL__ ) ; subst ( buff , NE_HAT , HAT_NOT_EQUAL__ ) ; subst ( buff , LE , LESS_THAN_EQUAL__ ) ; subst ( buff , GE , GREATER_THAN_EQUAL__ ) ; subst ( buff , CONCAT , CONCAT__ ) ; subst ( buff , LT , LESS_THAN__ ) ; subst ( buff , EQ , EQUAL__ ) ; subst ( buff , GT , GREATER__ ) ; subst ( buff , OPEN , LEFT_PAREN__ ) ; subst ( buff , CLOSE , RIGHT_PAREN__ ) ; subst ( buff , OPEN_BRACKET , LEFT_BRACKET__ ) ; subst ( buff , CLOSE_BRACKET , RIGHT_BRACKET__ ) ; subst ( buff , PLUS , PLUS__ ) ; subst ( buff , MINUS , MINUS__ ) ; subst ( buff , STAR , STAR__ ) ; subst ( buff , DIV , DIVIDE__ ) ; subst ( buff , MOD , MODULUS__ ) ; subst ( buff , COLON , COLON__ ) ; subst ( buff , PARAM , PARAM__ ) ; subst ( buff , COMMA , COMMA__ ) ; subst ( buff , SPACE , SPACE__ ) ; subst ( buff , TAB , TAB__ ) ; subst ( buff , NEWLINE , NEWLINE__ ) ; subst ( buff , LINEFEED , LINEFEED__ ) ; subst ( buff , QUOTE , QUOTE__ ) ; subst ( buff , DQUOTE , DQUOTE__ ) ; subst ( buff , TICK , TICK__ ) ; subst ( buff , OPEN_BRACE , OPEN_BRACE__ ) ; subst ( buff , CLOSE_BRACE , CLOSE_BRACE__ ) ; subst ( buff , HAT , HAT__ ) ; subst ( buff , AMPERSAND , AMPERSAND__ ) ; return buff . toString ( ) ;


signature:
public class QueryName { /** * Substitute sub - strings inside of a string .
 * @ param stringBuilder String buffer to use for substitution ( buffer is not reset )
 * @ param from String to substitute from
 * @ param to String to substitute to */
private static void subst ( final StringBuilder stringBuilder , final String from , final String to ) { } }

implementation:
int begin = 0 , end = 0 ; while ( ( end = stringBuilder . indexOf ( from , end ) ) != - 1 ) { stringBuilder . delete ( end , end + from . length ( ) ) ; stringBuilder . insert ( end , to ) ; // update positions
begin = end + to . length ( ) ; end = begin ; }


signature:
public class SimpleResourceTransformer { /** * { @ inheritDoc } */
@ Override public void transformResource ( ResourceTransformationContext context , PathAddress address , Resource resource ) throws OperationFailedException { } }

implementation: context . addTransformedResourceFromRoot ( this . addressTransformer . transform ( address ) , resource ) . processChildren ( resource ) ;


signature:
public class AbstractDataSourceService { /** * Performs the actual work of stopping the service . Should be called by { @ link # stop ( org . jboss . msc . service . StopContext ) }
 * asynchronously from the MSC thread that invoked stop . */
protected synchronized void stopService ( ) { } }

implementation: if ( deploymentMD != null ) { if ( deploymentMD . getResourceAdapterKey ( ) != null ) { try { raRepository . getValue ( ) . unregisterResourceAdapter ( deploymentMD . getResourceAdapterKey ( ) ) ; } catch ( org . jboss . jca . core . spi . rar . NotFoundException nfe ) { ConnectorLogger . ROOT_LOGGER . exceptionDuringUnregistering ( nfe ) ; } } if ( deploymentMD . getResourceAdapter ( ) != null ) { deploymentMD . getResourceAdapter ( ) . stop ( ) ; if ( BootstrapContextCoordinator . getInstance ( ) != null && deploymentMD . getBootstrapContextIdentifier ( ) != null ) { BootstrapContextCoordinator . getInstance ( ) . removeBootstrapContext ( deploymentMD . getBootstrapContextIdentifier ( ) ) ; } } if ( deploymentMD . getDataSources ( ) != null && managementRepositoryValue . getValue ( ) != null ) { for ( org . jboss . jca . core . api . management . DataSource mgtDs : deploymentMD . getDataSources ( ) ) { managementRepositoryValue . getValue ( ) . getDataSources ( ) . remove ( mgtDs ) ; } } if ( deploymentMD . getConnectionManagers ( ) != null ) { for ( ConnectionManager cm : deploymentMD . getConnectionManagers ( ) ) { cm . shutdown ( ) ; } } } sqlDataSource = null ;


signature:
public class ImportJournalOperation { /** * The XmlDataImporter requires a connector to connect to the artemis broker .
 * We require to use a in - vm one so that importing a journal is not subject to any network connection problem . */
private TransportConfiguration createInVMTransportConfiguration ( OperationContext context ) throws OperationFailedException { } }

implementation: final Resource serverResource = context . readResource ( EMPTY_ADDRESS , false ) ; Set < Resource . ResourceEntry > invmConnectors = serverResource . getChildren ( CommonAttributes . IN_VM_CONNECTOR ) ; if ( invmConnectors . isEmpty ( ) ) { throw MessagingLogger . ROOT_LOGGER . noInVMConnector ( ) ; } Resource . ResourceEntry connectorEntry = invmConnectors . iterator ( ) . next ( ) ; Resource connectorResource = context . readResource ( PathAddress . pathAddress ( connectorEntry . getPathElement ( ) ) , false ) ; ModelNode model = connectorResource . getModel ( ) ; Map < String , Object > params = new HashMap < > ( CommonAttributes . PARAMS . unwrap ( context , model ) ) ; params . put ( InVMTransportDefinition . SERVER_ID . getName ( ) , InVMTransportDefinition . SERVER_ID . resolveModelAttribute ( context , model ) . asInt ( ) ) ; TransportConfiguration transportConfiguration = new TransportConfiguration ( InVMConnectorFactory . class . getName ( ) , params ) ; return transportConfiguration ;


signature:
public class ResourceAdaptorMergingProcessor { /** * adds ear prefix to configured adapter name if it is specified in relative form */
private String addEarPrefixIfRelativeName ( final String configuredName , final DeploymentUnit deploymentUnit , final Class < ? > componentClass ) throws DeploymentUnitProcessingException { } }

implementation: if ( ! configuredName . startsWith ( "#" ) ) { return configuredName ; } final DeploymentUnit parent = deploymentUnit . getParent ( ) ; if ( parent == null ) { throw EjbLogger . ROOT_LOGGER . relativeResourceAdapterNameInStandaloneModule ( deploymentUnit . getName ( ) , componentClass . getName ( ) , configuredName ) ; } return new StringBuilder ( ) . append ( parent . getName ( ) ) . append ( configuredName ) . toString ( ) ;


signature:
public class Utils { /** * Returns the parent of the given deployment unit if such a parent exists . If the given deployment unit is the parent
 * deployment unit , it is returned . */
public static DeploymentUnit getRootDeploymentUnit ( DeploymentUnit deploymentUnit ) { } }

implementation: if ( deploymentUnit . getParent ( ) == null ) { return deploymentUnit ; } return deploymentUnit . getParent ( ) ;


signature:
public class ViewDescription { /** * Get the service name for this view .
 * @ return the service name */
public ServiceName getServiceName ( ) { } }

implementation:
// TODO : need to set viewNameParts somewhere
if ( ! viewNameParts . isEmpty ( ) ) { return componentDescription . getServiceName ( ) . append ( "VIEW" ) . append ( viewNameParts . toArray ( new String [ viewNameParts . size ( ) ] ) ) ; } else { return componentDescription . getServiceName ( ) . append ( "VIEW" ) . append ( viewClassName ) ; }


signature:
public class ViewDescription { /** * Creates view configuration . Allows for extensibility in EE sub components .
 * @ param viewClass view class
 * @ param componentConfiguration component config
 * @ param proxyFactory proxy factory
 * @ return new view configuration */
public ViewConfiguration createViewConfiguration ( final Class < ? > viewClass , final ComponentConfiguration componentConfiguration , final ProxyFactory < ? > proxyFactory ) { } }

implementation: return new ViewConfiguration ( viewClass , componentConfiguration , getServiceName ( ) , proxyFactory ) ;


signature:
public class ViewDescription { /** * Create the injection source
 * @ param serviceName The view service name
 * @ param viewClassLoader */
protected InjectionSource createInjectionSource ( final ServiceName serviceName , Value < ClassLoader > viewClassLoader , boolean appclient ) { } }

implementation: return new ViewBindingInjectionSource ( serviceName ) ;


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

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


signature:
public class ViewConfiguration { /** * Get the view interceptors for a method . These interceptors are run sequentially on the " server side " of an
 * invocation . The interceptor factories are used every time a new view instance is constructed , called with a
 * new factory context each time . The factory may return the same interceptor instance or a new interceptor
 * instance as appropriate .
 * @ param method the method to look up
 * @ return the interceptors for this method */
public List < InterceptorFactory > getViewInterceptors ( Method method ) { } }

implementation: OrderedItemContainer < InterceptorFactory > container = viewInterceptors . get ( method ) ; if ( container == null ) { return Collections . emptyList ( ) ; } return container . getSortedItems ( ) ;


signature:
public class ViewConfiguration { /** * Adds an interceptor factory to all methods of a view
 * @ param interceptorFactory The factory to add
 * @ param priority The interceptor order */
public void addViewInterceptor ( InterceptorFactory interceptorFactory , int priority ) { } }

implementation: for ( Method method : proxyFactory . getCachedMethods ( ) ) { addViewInterceptor ( method , interceptorFactory , priority ) ; }


signature:
public class ViewConfiguration { /** * Adds a view interceptor to the given method
 * @ param method The method to add
 * @ param interceptorFactory The interceptor factory
 * @ param priority The priority */
public void addViewInterceptor ( Method method , InterceptorFactory interceptorFactory , int priority ) { } }

implementation: OrderedItemContainer < InterceptorFactory > container = viewInterceptors . get ( method ) ; if ( container == null ) { viewInterceptors . put ( method , container = new OrderedItemContainer < InterceptorFactory > ( ) ) ; } container . add ( interceptorFactory , priority ) ;


signature:
public class ViewConfiguration { /** * Get the client interceptors for a method . These interceptors are run sequentially on the " client side " of an
 * invocation . The interceptor factories are used every time a new client proxy instance is constructed , called with a
 * new factory context each time . The factory may return the same interceptor instance or a new interceptor
 * instance as appropriate .
 * @ param method the method to look up
 * @ return the interceptors for this method */
public List < InterceptorFactory > getClientInterceptors ( Method method ) { } }

implementation: OrderedItemContainer < InterceptorFactory > container = clientInterceptors . get ( method ) ; if ( container == null ) { return Collections . emptyList ( ) ; } return container . getSortedItems ( ) ;


signature:
public class ViewConfiguration { /** * Adds a client interceptor factory to all methods of a view
 * @ param interceptorFactory The factory to add
 * @ param priority The interceptor order */
public void addClientInterceptor ( InterceptorFactory interceptorFactory , int priority ) { } }

implementation: for ( Method method : proxyFactory . getCachedMethods ( ) ) { addClientInterceptor ( method , interceptorFactory , priority ) ; }


signature:
public class ViewConfiguration { /** * Adds a client interceptor to the given method
 * @ param method The method to add
 * @ param interceptorFactory The interceptor factory
 * @ param priority The priority */
public void addClientInterceptor ( Method method , InterceptorFactory interceptorFactory , int priority ) { } }

implementation: OrderedItemContainer < InterceptorFactory > container = clientInterceptors . get ( method ) ; if ( container == null ) { clientInterceptors . put ( method , container = new OrderedItemContainer < InterceptorFactory > ( ) ) ; } container . add ( interceptorFactory , priority ) ;


signature:
public class ViewConfiguration { /** * Attaches arbitrary private data to this view instance
 * @ param type The type of data
 * @ param data The data */
public < T > void putPrivateData ( final Class < T > type , T data ) { } }

implementation: privateData . put ( type , data ) ;


signature:
public class SecurityActions { /** * Returns the < code > ModuleClassLoaderLocator . CombinedClassLoader < / code > instance with consideration of security manager enabled
 * @ param classLoaders the delegated ClassLoaders
 * @ return the < code > ModuleClassLoaderLocator . CombinedClassLoader < / code > instance */
static ModuleClassLoaderLocator . CombinedClassLoader createCombinedClassLoader ( final List < ClassLoader > classLoaders ) { } }

implementation: if ( WildFlySecurityManager . isChecking ( ) ) { return doPrivileged ( new PrivilegedAction < ModuleClassLoaderLocator . CombinedClassLoader > ( ) { @ Override public CombinedClassLoader run ( ) { return new ModuleClassLoaderLocator . CombinedClassLoader ( classLoaders ) ; } } ) ; } else { return new ModuleClassLoaderLocator . CombinedClassLoader ( classLoaders ) ; }


signature:
public class EJBClientDescriptor10Parser { /** * Throws a XMLStreamException for the unexpected element that was encountered during the parse
 * @ param reader the stream reader
 * @ throws XMLStreamException */
protected static void unexpectedElement ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } }

implementation: throw EeLogger . ROOT_LOGGER . unexpectedElement ( reader . getName ( ) , reader . getLocation ( ) ) ;


signature:
public class RemoveStepHandler { /** * Determines whether resource removal happens in this step , or a subsequent step */
private static boolean removeInCurrentStep ( Resource resource ) { } }

implementation: for ( String childType : resource . getChildTypes ( ) ) { for ( Resource . ResourceEntry entry : resource . getChildren ( childType ) ) { if ( ! entry . isRuntime ( ) && resource . hasChild ( entry . getPathElement ( ) ) ) { return false ; } } } return true ;


signature:
public class PooledConnectionFactoryDefinition { /** * the regular and pooled CF */
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 if ( definition == Common . CONNECTORS ) { StringListAttributeDefinition copy = new StringListAttributeDefinition . Builder ( Common . CONNECTORS ) . setAlternatives ( CommonAttributes . DISCOVERY_GROUP ) . setRequired ( true ) . setAttributeParser ( AttributeParser . STRING_LIST ) . setAttributeMarshaller ( AttributeMarshaller . STRING_LIST ) . setCapabilityReference ( new AbstractTransportDefinition . TransportCapabilityReferenceRecorder ( CAPABILITY_NAME , CONNECTOR_CAPABILITY_NAME , false ) ) . setRestartAllServices ( ) . build ( ) ; newAttr = ConnectionFactoryAttribute . create ( copy , attr . getPropertyName ( ) , attr . isResourceAdapterProperty ( ) , attr . getConfigType ( ) ) ; } else { AttributeDefinition copy = copy ( definition , AttributeAccess . Flag . RESTART_ALL_SERVICES ) ; newAttr = ConnectionFactoryAttribute . create ( copy , attr . getPropertyName ( ) , attr . isResourceAdapterProperty ( ) , attr . getConfigType ( ) ) ; } result [ specific . length + i ] = newAttr ; } return result ;


signature:
public class ASHelper { /** * Gets list of JAXWS EJBs meta data .
 * @ param unit deployment unit
 * @ return list of JAXWS EJBs meta data */
public static List < EJBEndpoint > getJaxwsEjbs ( final DeploymentUnit unit ) { } }

implementation: final JAXWSDeployment jaxwsDeployment = getOptionalAttachment ( unit , WSAttachmentKeys . JAXWS_ENDPOINTS_KEY ) ; return jaxwsDeployment != null ? jaxwsDeployment . getEjbEndpoints ( ) : Collections . < EJBEndpoint > emptyList ( ) ;


signature:
public class ASHelper { /** * Gets list of JAXWS POJOs meta data .
 * @ param unit deployment unit
 * @ return list of JAXWS POJOs meta data */
public static List < POJOEndpoint > getJaxwsPojos ( final DeploymentUnit unit ) { } }

implementation: final JAXWSDeployment jaxwsDeployment = unit . getAttachment ( WSAttachmentKeys . JAXWS_ENDPOINTS_KEY ) ; return jaxwsDeployment != null ? jaxwsDeployment . getPojoEndpoints ( ) : Collections . < POJOEndpoint > emptyList ( ) ;


signature:
public class ASHelper { /** * Returns endpoint name .
 * @ param servletMD servlet meta data
 * @ return endpoint name */
public static String getEndpointName ( final ServletMetaData servletMD ) { } }

implementation: final String endpointName = servletMD . getName ( ) ; return endpointName != null ? endpointName . trim ( ) : null ;


signature:
public class ASHelper { /** * Returns endpoint class name .
 * @ param servletMD servlet meta data
 * @ return endpoint class name */
public static String getEndpointClassName ( final ServletMetaData servletMD ) { } }

implementation: final String endpointClass = servletMD . getServletClass ( ) ; return endpointClass != null ? endpointClass . trim ( ) : null ;


signature:
public class ASHelper { /** * Returns servlet meta data for requested servlet name .
 * @ param jbossWebMD jboss web meta data
 * @ param servletName servlet name
 * @ return servlet meta data */
public static ServletMetaData getServletForName ( final JBossWebMetaData jbossWebMD , final String servletName ) { } }

implementation: for ( JBossServletMetaData servlet : jbossWebMD . getServlets ( ) ) { if ( servlet . getName ( ) . equals ( servletName ) ) { return servlet ; } } return null ;


signature:
public class ASHelper { /** * Returns required attachment value from deployment unit .
 * @ param < A > expected value
 * @ param unit deployment unit
 * @ param key attachment key
 * @ return required attachment
 * @ throws IllegalStateException if attachment value is null */
public static < A > A getRequiredAttachment ( final DeploymentUnit unit , final AttachmentKey < A > key ) { } }

implementation: final A value = unit . getAttachment ( key ) ; if ( value == null ) { throw new IllegalStateException ( ) ; } return value ;


signature:
public class ASHelper { /** * Returns optional attachment value from deployment unit or null if not bound .
 * @ param < A > expected value
 * @ param unit deployment unit
 * @ param key attachment key
 * @ return optional attachment value or null */
public static < A > A getOptionalAttachment ( final DeploymentUnit unit , final AttachmentKey < A > key ) { } }

implementation: return unit . getAttachment ( key ) ;


signature:
public class ASHelper { /** * Gets the JBossWebMetaData from the WarMetaData attached to the provided deployment unit , if any .
 * @ param unit
 * @ return the JBossWebMetaData or null if either that or the parent WarMetaData are not found . */
public static JBossWebMetaData getJBossWebMetaData ( final DeploymentUnit unit ) { } }

implementation: final WarMetaData warMetaData = getOptionalAttachment ( unit , WarMetaData . ATTACHMENT_KEY ) ; JBossWebMetaData result = null ; if ( warMetaData != null ) { result = warMetaData . getMergedJBossWebMetaData ( ) ; if ( result == null ) { result = warMetaData . getJBossWebMetaData ( ) ; } } else { result = getOptionalAttachment ( unit , WSAttachmentKeys . JBOSSWEB_METADATA_KEY ) ; } return result ;


signature:
public class ASHelper { /** * Return a named port - component from the jboss - webservices . xml
 * @ param unit
 * @ param name
 * @ return */
public static JBossPortComponentMetaData getJBossWebserviceMetaDataPortComponent ( final DeploymentUnit unit , final String name ) { } }

implementation: if ( name != null ) { final JBossWebservicesMetaData jbossWebserviceMetaData = unit . getAttachment ( JBOSS_WEBSERVICES_METADATA_KEY ) ; if ( jbossWebserviceMetaData != null ) { JBossPortComponentMetaData [ ] portComponent = jbossWebserviceMetaData . getPortComponents ( ) ; if ( portComponent != null ) { for ( JBossPortComponentMetaData component : portComponent ) { if ( name . equals ( component . getEjbName ( ) ) ) { return component ; } } } } } return null ;


signature:
public class ASHelper { /** * Returns an EJBEndpoint based upon fully qualified classname .
 * @ param jaxwsDeployment
 * @ param className
 * @ return */
public static EJBEndpoint getWebserviceMetadataEJBEndpoint ( final JAXWSDeployment jaxwsDeployment , final String className ) { } }

implementation: java . util . List < EJBEndpoint > ejbEndpointList = jaxwsDeployment . getEjbEndpoints ( ) ; for ( EJBEndpoint ejbEndpoint : ejbEndpointList ) { if ( className . equals ( ejbEndpoint . getClassName ( ) ) ) { return ejbEndpoint ; } } return null ;


signature:
public class ASHelper { /** * Returns context root associated with webservice deployment .
 * If there ' s application . xml descriptor provided defining nested web module , then context root defined there will be
 * returned . Otherwise context root defined in jboss - web . xml will be returned .
 * @ param dep webservice deployment
 * @ param jbossWebMD jboss web meta data
 * @ return context root */
public static String getContextRoot ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } }

implementation:
final DeploymentUnit unit = WSHelper . getRequiredAttachment ( dep , DeploymentUnit . class ) ; final JBossAppMetaData jbossAppMD = unit . getParent ( ) == null ? null : ASHelper . getOptionalAttachment ( unit . getParent ( ) , WSAttachmentKeys . JBOSS_APP_METADATA_KEY ) ; String contextRoot = null ; // prefer context root defined in application . xml over one defined in jboss - web . xml
if ( jbossAppMD != null ) { final ModuleMetaData moduleMD = jbossAppMD . getModules ( ) . get ( dep . getSimpleName ( ) ) ; if ( moduleMD != null ) { final WebModuleMetaData webModuleMD = ( WebModuleMetaData ) moduleMD . getValue ( ) ; contextRoot = webModuleMD . getContextRoot ( ) ; } } if ( contextRoot == null ) { contextRoot = jbossWebMD != null ? jbossWebMD . getContextRoot ( ) : null ; } return contextRoot ;


signature:
public class ChainedOperationTransformer { /** * { @ inheritDoc } */
@ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode originalOperation ) throws OperationFailedException { } }

implementation:
String originalName = Operations . getName ( originalOperation ) ; PathAddress originalAddress = Operations . getPathAddress ( originalOperation ) ; Deque < ModelNode > preSteps = new LinkedList < > ( ) ; Deque < ModelNode > postSteps = new LinkedList < > ( ) ; ModelNode operation = originalOperation ; for ( OperationTransformer transformer : this . transformers ) { operation = transformer . transformOperation ( context , address , operation ) . getTransformedOperation ( ) ; // If the transformed operation is a composite operation , locate the modified operation and record any pre / post operations
if ( this . collate && operation . get ( ModelDescriptionConstants . OP ) . asString ( ) . equals ( ModelDescriptionConstants . COMPOSITE ) ) { List < ModelNode > stepList = operation . get ( ModelDescriptionConstants . STEPS ) . asList ( ) ; ListIterator < ModelNode > steps = stepList . listIterator ( ) ; while ( steps . hasNext ( ) ) { ModelNode step = steps . next ( ) ; String operationName = Operations . getName ( step ) ; PathAddress operationAddress = Operations . getPathAddress ( step ) ; if ( operationName . equals ( originalName ) && operationAddress . equals ( originalAddress ) ) { operation = step ; break ; } preSteps . addLast ( step ) ; } steps = stepList . listIterator ( stepList . size ( ) ) ; while ( steps . hasPrevious ( ) ) { ModelNode step = steps . previous ( ) ; String operationName = Operations . getName ( step ) ; PathAddress operationAddress = Operations . getPathAddress ( step ) ; if ( operationName . equals ( originalName ) && operationAddress . equals ( originalAddress ) ) { break ; } postSteps . addFirst ( step ) ; } } } if ( this . collate ) { int count = preSteps . size ( ) + postSteps . size ( ) + 1 ; // If there are any pre or post steps , we need a composite operation
if ( count > 1 ) { List < ModelNode > steps = new ArrayList < > ( count ) ; steps . addAll ( preSteps ) ; steps . add ( operation ) ; steps . addAll ( postSteps ) ; operation = Operations . createCompositeOperation ( steps ) ; } } return new TransformedOperation ( operation , OperationResultTransformer . ORIGINAL_RESULT ) ;


signature:
public class JaasConfigurationService { /** * { @ inheritDoc } */
@ Override public void start ( StartContext context ) throws StartException { } }

implementation:
SecurityLogger . ROOT_LOGGER . debug ( "Starting JaasConfigurationService" ) ; // set new configuration
synchronized ( Configuration . class ) { Configuration . setConfiguration ( configuration ) ; }


signature:
public class IIOPSubsystemAdd { /** * Obtains the subsystem configuration properties from the specified { @ code ModelNode } , using default values for undefined
 * properties . If the property has a IIOP equivalent , it is translated into its IIOP counterpart before being added to
 * the returned { @ code Properties } object .
 * @ param model the { @ code ModelNode } that contains the subsystem configuration properties .
 * @ return a { @ code Properties } instance containing all configured subsystem properties .
 * @ throws OperationFailedException if an error occurs while resolving the properties . */
protected Properties getConfigurationProperties ( OperationContext context , ModelNode model ) throws OperationFailedException { } }

implementation:
Properties props = new Properties ( ) ; getResourceProperties ( props , IIOPRootDefinition . INSTANCE , context , model ) ; // check if the node contains a list of generic properties .
ModelNode configNode = model . get ( Constants . CONFIGURATION ) ; if ( configNode . hasDefined ( Constants . PROPERTIES ) ) { for ( Property property : configNode . get ( Constants . PROPERTIES ) . get ( Constants . PROPERTY ) . asPropertyList ( ) ) { String name = property . getName ( ) ; String value = property . getValue ( ) . get ( Constants . PROPERTY_VALUE ) . asString ( ) ; props . setProperty ( name , value ) ; } } return props ;


signature:
public class IIOPSubsystemAdd { /** * Sets up the ORB initializers according to what has been configured in the subsystem .
 * @ param props the subsystem configuration properties . */
private void setupInitializers ( Properties props ) { } }

implementation:
List < String > orbInitializers = new ArrayList < String > ( ) ; // check which groups of initializers are to be installed .
String installSecurity = ( String ) props . remove ( Constants . ORB_INIT_SECURITY ) ; if ( installSecurity . equalsIgnoreCase ( Constants . CLIENT ) ) { orbInitializers . addAll ( Arrays . asList ( IIOPInitializer . SECURITY_CLIENT . getInitializerClasses ( ) ) ) ; } else if ( installSecurity . equalsIgnoreCase ( Constants . IDENTITY ) ) { orbInitializers . addAll ( Arrays . asList ( IIOPInitializer . SECURITY_IDENTITY . getInitializerClasses ( ) ) ) ; } else if ( installSecurity . equalsIgnoreCase ( Constants . ELYTRON ) ) { final String authContext = props . getProperty ( Constants . ORB_INIT_AUTH_CONTEXT ) ; ElytronSASClientInterceptor . setAuthenticationContextName ( authContext ) ; orbInitializers . addAll ( Arrays . asList ( IIOPInitializer . SECURITY_ELYTRON . getInitializerClasses ( ) ) ) ; } String installTransaction = ( String ) props . remove ( Constants . ORB_INIT_TRANSACTIONS ) ; if ( installTransaction . equalsIgnoreCase ( Constants . FULL ) ) { orbInitializers . addAll ( Arrays . asList ( IIOPInitializer . TRANSACTIONS . getInitializerClasses ( ) ) ) ; } else if ( installTransaction . equalsIgnoreCase ( Constants . SPEC ) ) { orbInitializers . addAll ( Arrays . asList ( IIOPInitializer . SPEC_TRANSACTIONS . getInitializerClasses ( ) ) ) ; } // add the standard opendk initializer plus all configured initializers .
for ( String initializerClass : orbInitializers ) { props . setProperty ( Constants . ORB_INITIALIZER_PREFIX + initializerClass , "" ) ; }


signature:
public class IIOPSubsystemAdd { /** * Sets up the SSL domain socket factories if SSL support has been enabled .
 * @ param props the subsystem configuration properties .
 * @ return true if ssl has been configured
 * @ throws OperationFailedException if the SSL setup has not been done correctly ( SSL support has been turned on but no
 * security domain has been specified ) . */
private boolean setupSSLFactories ( final Properties props ) throws OperationFailedException { } }

implementation:
final boolean supportSSL = "true" . equalsIgnoreCase ( props . getProperty ( Constants . SECURITY_SUPPORT_SSL ) ) ; final boolean sslConfigured ; if ( supportSSL ) { // if the config is using Elytron supplied SSL contexts , install the SSLSocketFactory .
final String serverSSLContextName = props . getProperty ( Constants . SERVER_SSL_CONTEXT ) ; final String clientSSLContextName = props . getProperty ( Constants . CLIENT_SSL_CONTEXT ) ; if ( serverSSLContextName != null && clientSSLContextName != null ) { SSLSocketFactory . setServerSSLContextName ( serverSSLContextName ) ; SSLSocketFactory . setClientSSLContextName ( clientSSLContextName ) ; props . setProperty ( ORBConstants . SOCKET_FACTORY_CLASS_PROPERTY , SSLSocketFactory . class . getName ( ) ) ; } else { // if the config only has a legacy JSSE domain reference , install the LegacySSLSocketFactory .
final String securityDomain = props . getProperty ( Constants . SECURITY_SECURITY_DOMAIN ) ; LegacySSLSocketFactory . setSecurityDomain ( securityDomain ) ; props . setProperty ( ORBConstants . SOCKET_FACTORY_CLASS_PROPERTY , LegacySSLSocketFactory . class . getName ( ) ) ; } sslConfigured = true ; } else { props . setProperty ( ORBConstants . SOCKET_FACTORY_CLASS_PROPERTY , NoSSLSocketFactory . class . getName ( ) ) ; sslConfigured = false ; } return sslConfigured ;


signature:
public class SecurityBootstrapService { /** * { @ inheritDoc } */
@ Override public void start ( StartContext context ) throws StartException { } }

implementation:
log . debugf ( "Starting SecurityBootstrapService" ) ; // Print out the current version of PicketBox
SecurityLogger . ROOT_LOGGER . currentVersion ( org . picketbox . Version . VERSION ) ; initializeJacc ( ) ; setupPolicyRegistration ( context ) ;


signature:
public class SecurityBootstrapService { /** * { @ inheritDoc } */
@ SuppressWarnings ( "rawtypes" ) @ Override public void stop ( StopContext context ) { } }

implementation:
// remove handlers
Set handlerKeys = PolicyContext . getHandlerKeys ( ) ; handlerKeys . remove ( SecurityConstants . CALLBACK_HANDLER_KEY ) ; handlerKeys . remove ( SecurityConstants . SUBJECT_CONTEXT_KEY ) ; // Install the policy provider that existed on startup
if ( initializeJacc && jaccPolicy != null ) Policy . setPolicy ( oldPolicy ) ;


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

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


signature:
public class WeldModuleResourceLoader { /** * If the class name is found in additionalClasses then return it .
 * Otherwise the class will be loaded from the module ClassLoader */
@ Override public Class < ? > classForName ( String name ) { } }

implementation: try { if ( classes . containsKey ( name ) ) { return classes . get ( name ) ; } final Class < ? > clazz = module . getClassLoader ( ) . loadClass ( name ) ; classes . put ( name , clazz ) ; return clazz ; } catch ( ClassNotFoundException | LinkageError e ) { throw new ResourceLoadingException ( e ) ; }


signature:
public class WeldModuleResourceLoader { /** * Loads a resource from the module class loader */
@ Override public URL getResource ( String name ) { } }

implementation: try { return module . getClassLoader ( ) . getResource ( name ) ; } catch ( Exception e ) { throw new ResourceLoadingException ( e ) ; }


signature:
public class WeldModuleResourceLoader { /** * Loads resources from the module class loader */
@ Override public Collection < URL > getResources ( String name ) { } }

implementation: try { final HashSet < URL > resources = new HashSet < URL > ( ) ; Enumeration < URL > urls = module . getClassLoader ( ) . getResources ( name ) ; while ( urls . hasMoreElements ( ) ) { resources . add ( urls . nextElement ( ) ) ; } return resources ; } catch ( Exception e ) { throw new ResourceLoadingException ( e ) ; }


signature:
public class ServletResourceManager { /** * Lists all children of a particular path , taking overlays into account
 * @ param path The path
 * @ return The list of children */
public List < Resource > list ( String path ) { } }

implementation:
try { final List < Resource > ret = new ArrayList < > ( ) ; Resource res = deploymentResourceManager . getResource ( path ) ; if ( res != null ) { for ( Resource child : res . list ( ) ) { ret . add ( new ServletResource ( this , child ) ) ; } } String p = path ; if ( p . startsWith ( "/" ) ) { p = p . substring ( 1 ) ; } if ( overlays != null ) { for ( VirtualFile overlay : overlays ) { VirtualFile child = overlay . getChild ( p ) ; if ( child . exists ( ) ) { VirtualFileResource vfsResource = new VirtualFileResource ( overlay . getPhysicalFile ( ) , child , path ) ; for ( Resource c : vfsResource . list ( ) ) { ret . add ( new ServletResource ( this , c ) ) ; } } } } return ret ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; // this method really should have thrown IOException
}


signature:
public class RarDependencyProcessor { /** * Add dependencies for modules required for ra deployments
 * @ param phaseContext the deployment unit context
 * @ throws DeploymentUnitProcessingException */
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( Attachments . MODULE_SPECIFICATION ) ; moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , RESOURCE_API_ID , false , false , false , false ) ) ; if ( phaseContext . getDeploymentUnit ( ) . getAttachment ( ConnectorXmlDescriptor . ATTACHMENT_KEY ) == null ) { return ; // Skip non ra deployments
} // if a module depends on a rar it also needs a dep on all the rar ' s " local dependencies "
moduleSpecification . setLocalDependenciesTransitive ( true ) ; moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , JMS_ID , false , false , false , false ) ) ; moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , VALIDATION_ID , false , false , false , false ) ) ; moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , IRON_JACAMAR_ID , false , false , false , false ) ) ; moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , IRON_JACAMAR_IMPL_ID , false , true , false , false ) ) ; moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , HIBERNATE_VALIDATOR_ID , false , false , true , false ) ) ; if ( ! appclient ) phaseContext . addDeploymentDependency ( ConnectorServices . RESOURCEADAPTERS_SUBSYSTEM_SERVICE , ResourceAdaptersSubsystemService . ATTACHMENT_KEY ) ;


signature:
public class NonTxEmCloser { /** * current session bean invocation is ending , close any transactional entity managers created without a JTA
 * transaction . */
public static void popCall ( ) { } }

implementation: Map < String , EntityManager > emStack = nonTxStack . pop ( ) ; if ( emStack != null ) { for ( EntityManager entityManager : emStack . values ( ) ) { try { if ( entityManager . isOpen ( ) ) { entityManager . close ( ) ; } } catch ( RuntimeException safeToIgnore ) { if ( ROOT_LOGGER . isTraceEnabled ( ) ) { ROOT_LOGGER . trace ( "Could not close (non-transactional) container managed entity manager." + "  This shouldn't impact application functionality (only read " + "operations occur in non-transactional mode)" , safeToIgnore ) ; } } } }


signature:
public class NonTxEmCloser { /** * Return the transactional entity manager for the specified scoped persistence unit name
 * @ param puScopedName
 * @ return */
public static EntityManager get ( String puScopedName ) { } }

implementation: Map < String , EntityManager > map = nonTxStack . peek ( ) ; if ( map != null ) { return map . get ( puScopedName ) ; } return null ;


signature:
public class TransactedJMSContext { /** * Closing of transaction scoped JMSContext is executed through Synchronization listener .
 * This method registers listener , which takes care of closing JMSContext .
 * @ param transactionSynchronizationRegistry
 * @ param contextInstance */
void registerCleanUpListener ( TransactionSynchronizationRegistry transactionSynchronizationRegistry , JMSContext contextInstance ) { } }

implementation:
// to avoid registration of more listeners for one context , flag in transaction is used .
Object alreadyRegistered = transactionSynchronizationRegistry . getResource ( contextInstance ) ; if ( alreadyRegistered == null ) { transactionSynchronizationRegistry . registerInterposedSynchronization ( new AfterCompletionSynchronization ( contextInstance ) ) ; transactionSynchronizationRegistry . putResource ( contextInstance , AfterCompletionSynchronization . class . getName ( ) ) ; }


signature:
public class EJB3Subsystem12Parser { /** * { @ inheritDoc } */
@ Override public void readElement ( final XMLExtendedStreamReader reader , final List < ModelNode > operations ) throws XMLStreamException { } }

implementation:
final ModelNode ejb3SubsystemAddOperation = Util . createAddOperation ( SUBSYSTEM_PATH ) ; operations . add ( ejb3SubsystemAddOperation ) ; readAttributes ( reader ) ; // elements
final EnumSet < EJB3SubsystemXMLElement > encountered = EnumSet . noneOf ( EJB3SubsystemXMLElement . class ) ; while ( reader . hasNext ( ) && reader . nextTag ( ) != XMLStreamConstants . END_ELEMENT ) { if ( EJB3SubsystemNamespace . forUri ( reader . getNamespaceURI ( ) ) != getExpectedNamespace ( ) ) { throw unexpectedElement ( reader ) ; } final EJB3SubsystemXMLElement element = EJB3SubsystemXMLElement . forName ( reader . getLocalName ( ) ) ; if ( ! encountered . add ( element ) ) { throw unexpectedElement ( reader ) ; } readElement ( reader , element , operations , ejb3SubsystemAddOperation ) ; }


signature:
public class WarAnnotationDeploymentProcessor { /** * Process web annotations . */
public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } }

implementation:
final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! DeploymentTypeMarker . isType ( DeploymentType . WAR , deploymentUnit ) ) { return ; // Skip non web deployments
} WarMetaData warMetaData = deploymentUnit . getAttachment ( WarMetaData . ATTACHMENT_KEY ) ; assert warMetaData != null ; Map < String , WebMetaData > annotationsMetaData = warMetaData . getAnnotationsMetaData ( ) ; if ( annotationsMetaData == null ) { annotationsMetaData = new HashMap < String , WebMetaData > ( ) ; warMetaData . setAnnotationsMetaData ( annotationsMetaData ) ; } Map < ResourceRoot , Index > indexes = AnnotationIndexUtils . getAnnotationIndexes ( deploymentUnit ) ; // Process lib / * . jar
for ( final Entry < ResourceRoot , Index > entry : indexes . entrySet ( ) ) { final Index jarIndex = entry . getValue ( ) ; annotationsMetaData . put ( entry . getKey ( ) . getRootName ( ) , processAnnotations ( jarIndex ) ) ; } Map < ModuleIdentifier , CompositeIndex > additionalModelAnnotations = deploymentUnit . getAttachment ( Attachments . ADDITIONAL_ANNOTATION_INDEXES_BY_MODULE ) ; if ( additionalModelAnnotations != null ) { final List < WebMetaData > additional = new ArrayList < WebMetaData > ( ) ; for ( Entry < ModuleIdentifier , CompositeIndex > entry : additionalModelAnnotations . entrySet ( ) ) { for ( Index index : entry . getValue ( ) . getIndexes ( ) ) { additional . add ( processAnnotations ( index ) ) ; } } warMetaData . setAdditionalModuleAnnotationsMetadata ( additional ) ; }


signature:
public class WarAnnotationDeploymentProcessor { /** * Process a single index .
 * @ param index the annotation index
 * @ throws DeploymentUnitProcessingException */
protected WebMetaData processAnnotations ( Index index ) throws DeploymentUnitProcessingException { } }

implementation:
WebMetaData metaData = new WebMetaData ( ) ; // @ WebServlet
final List < AnnotationInstance > webServletAnnotations = index . getAnnotations ( webServlet ) ; if ( webServletAnnotations != null && webServletAnnotations . size ( ) > 0 ) { ServletsMetaData servlets = new ServletsMetaData ( ) ; List < ServletMappingMetaData > servletMappings = new ArrayList < ServletMappingMetaData > ( ) ; for ( final AnnotationInstance annotation : webServletAnnotations ) { ServletMetaData servlet = new ServletMetaData ( ) ; AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidWebServletAnnotation ( target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; servlet . setServletClass ( classInfo . toString ( ) ) ; AnnotationValue nameValue = annotation . value ( "name" ) ; if ( nameValue == null || nameValue . asString ( ) . isEmpty ( ) ) { servlet . setName ( classInfo . toString ( ) ) ; } else { servlet . setName ( nameValue . asString ( ) ) ; } AnnotationValue loadOnStartup = annotation . value ( "loadOnStartup" ) ; if ( loadOnStartup != null && loadOnStartup . asInt ( ) >= 0 ) { servlet . setLoadOnStartupInt ( loadOnStartup . asInt ( ) ) ; } AnnotationValue asyncSupported = annotation . value ( "asyncSupported" ) ; if ( asyncSupported != null ) { servlet . setAsyncSupported ( asyncSupported . asBoolean ( ) ) ; } AnnotationValue initParamsValue = annotation . value ( "initParams" ) ; if ( initParamsValue != null ) { AnnotationInstance [ ] initParamsAnnotations = initParamsValue . asNestedArray ( ) ; if ( initParamsAnnotations != null && initParamsAnnotations . length > 0 ) { List < ParamValueMetaData > initParams = new ArrayList < ParamValueMetaData > ( ) ; for ( AnnotationInstance initParamsAnnotation : initParamsAnnotations ) { ParamValueMetaData initParam = new ParamValueMetaData ( ) ; AnnotationValue initParamName = initParamsAnnotation . value ( "name" ) ; AnnotationValue initParamValue = initParamsAnnotation . value ( ) ; if ( initParamName == null || initParamValue == null ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidWebInitParamAnnotation ( target ) ) ; } AnnotationValue initParamDescription = initParamsAnnotation . value ( "description" ) ; initParam . setParamName ( initParamName . asString ( ) ) ; initParam . setParamValue ( initParamValue . asString ( ) ) ; if ( initParamDescription != null ) { Descriptions descriptions = getDescription ( initParamDescription . asString ( ) ) ; if ( descriptions != null ) { initParam . setDescriptions ( descriptions ) ; } } initParams . add ( initParam ) ; } servlet . setInitParam ( initParams ) ; } } AnnotationValue descriptionValue = annotation . value ( "description" ) ; AnnotationValue displayNameValue = annotation . value ( "displayName" ) ; AnnotationValue smallIconValue = annotation . value ( "smallIcon" ) ; AnnotationValue largeIconValue = annotation . value ( "largeIcon" ) ; DescriptionGroupMetaData descriptionGroup = getDescriptionGroup ( ( descriptionValue == null ) ? "" : descriptionValue . asString ( ) , ( displayNameValue == null ) ? "" : displayNameValue . asString ( ) , ( smallIconValue == null ) ? "" : smallIconValue . asString ( ) , ( largeIconValue == null ) ? "" : largeIconValue . asString ( ) ) ; if ( descriptionGroup != null ) { servlet . setDescriptionGroup ( descriptionGroup ) ; } ServletMappingMetaData servletMapping = new ServletMappingMetaData ( ) ; servletMapping . setServletName ( servlet . getName ( ) ) ; List < String > urlPatterns = new ArrayList < String > ( ) ; AnnotationValue urlPatternsValue = annotation . value ( "urlPatterns" ) ; if ( urlPatternsValue != null ) { for ( String urlPattern : urlPatternsValue . asStringArray ( ) ) { urlPatterns . add ( urlPattern ) ; } } urlPatternsValue = annotation . value ( ) ; if ( urlPatternsValue != null ) { for ( String urlPattern : urlPatternsValue . asStringArray ( ) ) { urlPatterns . add ( urlPattern ) ; } } if ( urlPatterns . size ( ) > 0 ) { servletMapping . setUrlPatterns ( urlPatterns ) ; servletMappings . add ( servletMapping ) ; } servlets . add ( servlet ) ; } metaData . setServlets ( servlets ) ; metaData . setServletMappings ( servletMappings ) ; } // @ WebFilter
final List < AnnotationInstance > webFilterAnnotations = index . getAnnotations ( webFilter ) ; if ( webFilterAnnotations != null && webFilterAnnotations . size ( ) > 0 ) { FiltersMetaData filters = new FiltersMetaData ( ) ; List < FilterMappingMetaData > filterMappings = new ArrayList < FilterMappingMetaData > ( ) ; for ( final AnnotationInstance annotation : webFilterAnnotations ) { FilterMetaData filter = new FilterMetaData ( ) ; AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidWebFilterAnnotation ( target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; filter . setFilterClass ( classInfo . toString ( ) ) ; AnnotationValue nameValue = annotation . value ( "filterName" ) ; if ( nameValue == null || nameValue . asString ( ) . isEmpty ( ) ) { filter . setName ( classInfo . toString ( ) ) ; } else { filter . setName ( nameValue . asString ( ) ) ; } AnnotationValue asyncSupported = annotation . value ( "asyncSupported" ) ; if ( asyncSupported != null ) { filter . setAsyncSupported ( asyncSupported . asBoolean ( ) ) ; } AnnotationValue initParamsValue = annotation . value ( "initParams" ) ; if ( initParamsValue != null ) { AnnotationInstance [ ] initParamsAnnotations = initParamsValue . asNestedArray ( ) ; if ( initParamsAnnotations != null && initParamsAnnotations . length > 0 ) { List < ParamValueMetaData > initParams = new ArrayList < ParamValueMetaData > ( ) ; for ( AnnotationInstance initParamsAnnotation : initParamsAnnotations ) { ParamValueMetaData initParam = new ParamValueMetaData ( ) ; AnnotationValue initParamName = initParamsAnnotation . value ( "name" ) ; AnnotationValue initParamValue = initParamsAnnotation . value ( ) ; if ( initParamName == null || initParamValue == null ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidWebInitParamAnnotation ( target ) ) ; } AnnotationValue initParamDescription = initParamsAnnotation . value ( "description" ) ; initParam . setParamName ( initParamName . asString ( ) ) ; initParam . setParamValue ( initParamValue . asString ( ) ) ; if ( initParamDescription != null ) { Descriptions descriptions = getDescription ( initParamDescription . asString ( ) ) ; if ( descriptions != null ) { initParam . setDescriptions ( descriptions ) ; } } initParams . add ( initParam ) ; } filter . setInitParam ( initParams ) ; } } AnnotationValue descriptionValue = annotation . value ( "description" ) ; AnnotationValue displayNameValue = annotation . value ( "displayName" ) ; AnnotationValue smallIconValue = annotation . value ( "smallIcon" ) ; AnnotationValue largeIconValue = annotation . value ( "largeIcon" ) ; DescriptionGroupMetaData descriptionGroup = getDescriptionGroup ( ( descriptionValue == null ) ? "" : descriptionValue . asString ( ) , ( displayNameValue == null ) ? "" : displayNameValue . asString ( ) , ( smallIconValue == null ) ? "" : smallIconValue . asString ( ) , ( largeIconValue == null ) ? "" : largeIconValue . asString ( ) ) ; if ( descriptionGroup != null ) { filter . setDescriptionGroup ( descriptionGroup ) ; } filters . add ( filter ) ; FilterMappingMetaData filterMapping = new FilterMappingMetaData ( ) ; filterMapping . setFilterName ( filter . getName ( ) ) ; List < String > urlPatterns = new ArrayList < String > ( ) ; List < String > servletNames = new ArrayList < String > ( ) ; List < DispatcherType > dispatchers = new ArrayList < DispatcherType > ( ) ; AnnotationValue urlPatternsValue = annotation . value ( "urlPatterns" ) ; if ( urlPatternsValue != null ) { for ( String urlPattern : urlPatternsValue . asStringArray ( ) ) { urlPatterns . add ( urlPattern ) ; } } urlPatternsValue = annotation . value ( ) ; if ( urlPatternsValue != null ) { for ( String urlPattern : urlPatternsValue . asStringArray ( ) ) { urlPatterns . add ( urlPattern ) ; } } if ( urlPatterns . size ( ) > 0 ) { filterMapping . setUrlPatterns ( urlPatterns ) ; } AnnotationValue servletNamesValue = annotation . value ( "servletNames" ) ; if ( servletNamesValue != null ) { for ( String servletName : servletNamesValue . asStringArray ( ) ) { servletNames . add ( servletName ) ; } } if ( servletNames . size ( ) > 0 ) { filterMapping . setServletNames ( servletNames ) ; } AnnotationValue dispatcherTypesValue = annotation . value ( "dispatcherTypes" ) ; if ( dispatcherTypesValue != null ) { for ( String dispatcherValue : dispatcherTypesValue . asEnumArray ( ) ) { dispatchers . add ( DispatcherType . valueOf ( dispatcherValue ) ) ; } } if ( dispatchers . size ( ) > 0 ) { filterMapping . setDispatchers ( dispatchers ) ; } if ( urlPatterns . size ( ) > 0 || servletNames . size ( ) > 0 ) { filterMappings . add ( filterMapping ) ; } } metaData . setFilters ( filters ) ; metaData . setFilterMappings ( filterMappings ) ; } // @ WebListener
final List < AnnotationInstance > webListenerAnnotations = index . getAnnotations ( webListener ) ; if ( webListenerAnnotations != null && webListenerAnnotations . size ( ) > 0 ) { List < ListenerMetaData > listeners = new ArrayList < ListenerMetaData > ( ) ; for ( final AnnotationInstance annotation : webListenerAnnotations ) { ListenerMetaData listener = new ListenerMetaData ( ) ; AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidWebListenerAnnotation ( target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; listener . setListenerClass ( classInfo . toString ( ) ) ; AnnotationValue descriptionValue = annotation . value ( ) ; if ( descriptionValue != null ) { DescriptionGroupMetaData descriptionGroup = getDescriptionGroup ( descriptionValue . asString ( ) ) ; if ( descriptionGroup != null ) { listener . setDescriptionGroup ( descriptionGroup ) ; } } listeners . add ( listener ) ; } metaData . setListeners ( listeners ) ; } // @ RunAs
final List < AnnotationInstance > runAsAnnotations = index . getAnnotations ( runAs ) ; if ( runAsAnnotations != null && runAsAnnotations . size ( ) > 0 ) { AnnotationsMetaData annotations = metaData . getAnnotations ( ) ; if ( annotations == null ) { annotations = new AnnotationsMetaData ( ) ; metaData . setAnnotations ( annotations ) ; } for ( final AnnotationInstance annotation : runAsAnnotations ) { AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { continue ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; AnnotationMetaData annotationMD = annotations . get ( classInfo . toString ( ) ) ; if ( annotationMD == null ) { annotationMD = new AnnotationMetaData ( ) ; annotationMD . setClassName ( classInfo . toString ( ) ) ; annotations . add ( annotationMD ) ; } if ( annotation . value ( ) == null ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidRunAsAnnotation ( target ) ) ; } RunAsMetaData runAs = new RunAsMetaData ( ) ; runAs . setRoleName ( annotation . value ( ) . asString ( ) ) ; annotationMD . setRunAs ( runAs ) ; } } // @ DeclareRoles
final List < AnnotationInstance > declareRolesAnnotations = index . getAnnotations ( declareRoles ) ; if ( declareRolesAnnotations != null && declareRolesAnnotations . size ( ) > 0 ) { SecurityRolesMetaData securityRoles = metaData . getSecurityRoles ( ) ; if ( securityRoles == null ) { securityRoles = new SecurityRolesMetaData ( ) ; metaData . setSecurityRoles ( securityRoles ) ; } for ( final AnnotationInstance annotation : declareRolesAnnotations ) { if ( annotation . value ( ) == null ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidDeclareRolesAnnotation ( annotation . target ( ) ) ) ; } for ( String role : annotation . value ( ) . asStringArray ( ) ) { SecurityRoleMetaData sr = new SecurityRoleMetaData ( ) ; sr . setRoleName ( role ) ; securityRoles . add ( sr ) ; } } } // @ MultipartConfig
final List < AnnotationInstance > multipartConfigAnnotations = index . getAnnotations ( multipartConfig ) ; if ( multipartConfigAnnotations != null && multipartConfigAnnotations . size ( ) > 0 ) { AnnotationsMetaData annotations = metaData . getAnnotations ( ) ; if ( annotations == null ) { annotations = new AnnotationsMetaData ( ) ; metaData . setAnnotations ( annotations ) ; } for ( final AnnotationInstance annotation : multipartConfigAnnotations ) { AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidMultipartConfigAnnotation ( target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; AnnotationMetaData annotationMD = annotations . get ( classInfo . toString ( ) ) ; if ( annotationMD == null ) { annotationMD = new AnnotationMetaData ( ) ; annotationMD . setClassName ( classInfo . toString ( ) ) ; annotations . add ( annotationMD ) ; } MultipartConfigMetaData multipartConfig = new MultipartConfigMetaData ( ) ; AnnotationValue locationValue = annotation . value ( "location" ) ; if ( locationValue != null && locationValue . asString ( ) . length ( ) > 0 ) { multipartConfig . setLocation ( locationValue . asString ( ) ) ; } AnnotationValue maxFileSizeValue = annotation . value ( "maxFileSize" ) ; if ( maxFileSizeValue != null && maxFileSizeValue . asLong ( ) != - 1L ) { multipartConfig . setMaxFileSize ( maxFileSizeValue . asLong ( ) ) ; } AnnotationValue maxRequestSizeValue = annotation . value ( "maxRequestSize" ) ; if ( maxRequestSizeValue != null && maxRequestSizeValue . asLong ( ) != - 1L ) { multipartConfig . setMaxRequestSize ( maxRequestSizeValue . asLong ( ) ) ; } AnnotationValue fileSizeThresholdValue = annotation . value ( "fileSizeThreshold" ) ; if ( fileSizeThresholdValue != null && fileSizeThresholdValue . asInt ( ) != 0 ) { multipartConfig . setFileSizeThreshold ( fileSizeThresholdValue . asInt ( ) ) ; } annotationMD . setMultipartConfig ( multipartConfig ) ; } } // @ ServletSecurity
final List < AnnotationInstance > servletSecurityAnnotations = index . getAnnotations ( servletSecurity ) ; if ( servletSecurityAnnotations != null && servletSecurityAnnotations . size ( ) > 0 ) { AnnotationsMetaData annotations = metaData . getAnnotations ( ) ; if ( annotations == null ) { annotations = new AnnotationsMetaData ( ) ; metaData . setAnnotations ( annotations ) ; } for ( final AnnotationInstance annotation : servletSecurityAnnotations ) { AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( UndertowLogger . ROOT_LOGGER . invalidServletSecurityAnnotation ( target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; AnnotationMetaData annotationMD = annotations . get ( classInfo . toString ( ) ) ; if ( annotationMD == null ) { annotationMD = new AnnotationMetaData ( ) ; annotationMD . setClassName ( classInfo . toString ( ) ) ; annotations . add ( annotationMD ) ; } ServletSecurityMetaData servletSecurity = new ServletSecurityMetaData ( ) ; AnnotationValue httpConstraintValue = annotation . value ( ) ; List < String > rolesAllowed = new ArrayList < String > ( ) ; if ( httpConstraintValue != null ) { AnnotationInstance httpConstraint = httpConstraintValue . asNested ( ) ; AnnotationValue httpConstraintERSValue = httpConstraint . value ( ) ; if ( httpConstraintERSValue != null ) { servletSecurity . setEmptyRoleSemantic ( EmptyRoleSemanticType . valueOf ( httpConstraintERSValue . asEnum ( ) ) ) ; } AnnotationValue httpConstraintTGValue = httpConstraint . value ( "transportGuarantee" ) ; if ( httpConstraintTGValue != null ) { servletSecurity . setTransportGuarantee ( TransportGuaranteeType . valueOf ( httpConstraintTGValue . asEnum ( ) ) ) ; } AnnotationValue rolesAllowedValue = httpConstraint . value ( "rolesAllowed" ) ; if ( rolesAllowedValue != null ) { for ( String role : rolesAllowedValue . asStringArray ( ) ) { rolesAllowed . add ( role ) ; } } } servletSecurity . setRolesAllowed ( rolesAllowed ) ; AnnotationValue httpMethodConstraintsValue = annotation . value ( "httpMethodConstraints" ) ; if ( httpMethodConstraintsValue != null ) { AnnotationInstance [ ] httpMethodConstraints = httpMethodConstraintsValue . asNestedArray ( ) ; if ( httpMethodConstraints . length > 0 ) { List < HttpMethodConstraintMetaData > methodConstraints = new ArrayList < HttpMethodConstraintMetaData > ( ) ; for ( AnnotationInstance httpMethodConstraint : httpMethodConstraints ) { HttpMethodConstraintMetaData methodConstraint = new HttpMethodConstraintMetaData ( ) ; AnnotationValue httpMethodConstraintValue = httpMethodConstraint . value ( ) ; if ( httpMethodConstraintValue != null ) { methodConstraint . setMethod ( httpMethodConstraintValue . asString ( ) ) ; } AnnotationValue httpMethodConstraintERSValue = httpMethodConstraint . value ( "emptyRoleSemantic" ) ; if ( httpMethodConstraintERSValue != null ) { methodConstraint . setEmptyRoleSemantic ( EmptyRoleSemanticType . valueOf ( httpMethodConstraintERSValue . asEnum ( ) ) ) ; } AnnotationValue httpMethodConstraintTGValue = httpMethodConstraint . value ( "transportGuarantee" ) ; if ( httpMethodConstraintTGValue != null ) { methodConstraint . setTransportGuarantee ( TransportGuaranteeType . valueOf ( httpMethodConstraintTGValue . asEnum ( ) ) ) ; } AnnotationValue rolesAllowedValue = httpMethodConstraint . value ( "rolesAllowed" ) ; rolesAllowed = new ArrayList < String > ( ) ; if ( rolesAllowedValue != null ) { for ( String role : rolesAllowedValue . asStringArray ( ) ) { rolesAllowed . add ( role ) ; } } methodConstraint . setRolesAllowed ( rolesAllowed ) ; methodConstraints . add ( methodConstraint ) ; } servletSecurity . setHttpMethodConstraints ( methodConstraints ) ; } } annotationMD . setServletSecurity ( servletSecurity ) ; } } return metaData ;


signature:
public class WSServerConfigAttributeHandler { /** * Returns true if the update operation succeeds in modifying the runtime , false otherwise .
 * @ param attributeName
 * @ param value
 * @ return
 * @ throws OperationFailedException
 * @ throws DisabledOperationException */
private boolean updateServerConfig ( String attributeName , String value , boolean isRevert ) throws OperationFailedException , DisabledOperationException { } }

implementation:
final ServerConfigImpl config = ( ServerConfigImpl ) ServerConfigFactoryImpl . getConfig ( ) ; try { if ( MODIFY_WSDL_ADDRESS . equals ( attributeName ) ) { final boolean modifyWSDLAddress = value != null && Boolean . parseBoolean ( value ) ; config . setModifySOAPAddress ( modifyWSDLAddress , isRevert ) ; } else if ( WSDL_HOST . equals ( attributeName ) ) { final String host = value != null ? value : null ; try { config . setWebServiceHost ( host , isRevert ) ; } catch ( final UnknownHostException e ) { throw new OperationFailedException ( e . getMessage ( ) , e ) ; } } else if ( WSDL_PORT . equals ( attributeName ) ) { final int port = value != null ? Integer . parseInt ( value ) : - 1 ; config . setWebServicePort ( port , isRevert ) ; } else if ( WSDL_SECURE_PORT . equals ( attributeName ) ) { final int securePort = value != null ? Integer . parseInt ( value ) : - 1 ; config . setWebServiceSecurePort ( securePort , isRevert ) ; } else if ( WSDL_PATH_REWRITE_RULE . equals ( attributeName ) ) { final String path = value != null ? value : null ; config . setWebServicePathRewriteRule ( path , isRevert ) ; } else if ( WSDL_URI_SCHEME . equals ( attributeName ) ) { if ( value == null || value . equals ( "http" ) || value . equals ( "https" ) ) { config . setWebServiceUriScheme ( value , isRevert ) ; } else { throw new IllegalArgumentException ( attributeName + " = " + value ) ; } } else if ( STATISTICS_ENABLED . equals ( attributeName ) ) { final boolean enabled = value != null ? Boolean . parseBoolean ( value ) : false ; config . setStatisticsEnabled ( enabled ) ; } else { throw new IllegalArgumentException ( attributeName ) ; } } catch ( DisabledOperationException doe ) { // the WS stack rejected the runtime update
if ( ! isRevert ) { return false ; } else { throw doe ; } } return true ;


signature:
public class EeExtension { /** * { @ inheritDoc } */
@ Override public void initialize ( ExtensionContext context ) { } }

implementation:
final SubsystemRegistration subsystem = context . registerSubsystem ( SUBSYSTEM_NAME , CURRENT_MODEL_VERSION ) ; // Register the root subsystem resource .
final ManagementResourceRegistration rootResource = subsystem . registerSubsystemModel ( EeSubsystemRootResource . create ( ) ) ; // Mandatory describe operation
rootResource . registerOperationHandler ( GenericSubsystemDescribeHandler . DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ; // register submodels
rootResource . registerSubModel ( ContextServiceResourceDefinition . INSTANCE ) ; rootResource . registerSubModel ( ManagedThreadFactoryResourceDefinition . INSTANCE ) ; rootResource . registerSubModel ( ManagedExecutorServiceResourceDefinition . INSTANCE ) ; rootResource . registerSubModel ( ManagedScheduledExecutorServiceResourceDefinition . INSTANCE ) ; rootResource . registerSubModel ( new DefaultBindingsResourceDefinition ( new DefaultBindingsConfigurationProcessor ( ) ) ) ; subsystem . registerXMLElementWriter ( EESubsystemXmlPersister . INSTANCE ) ;


signature:
public class EeExtension { /** * { @ inheritDoc } */
@ Override public void initializeParsers ( ExtensionParsingContext context ) { } }

implementation: context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . EE_1_0 . getUriString ( ) , EESubsystemParser10 :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . EE_1_1 . getUriString ( ) , EESubsystemParser11 :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . EE_1_2 . getUriString ( ) , EESubsystemParser12 :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . EE_2_0 . getUriString ( ) , EESubsystemParser20 :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . EE_3_0 . getUriString ( ) , EESubsystemParser20 :: new ) ; context . setSubsystemXmlMapping ( SUBSYSTEM_NAME , Namespace . EE_4_0 . getUriString ( ) , EESubsystemParser40 :: new ) ; context . setProfileParsingCompletionHandler ( new BeanValidationProfileParsingCompletionHandler ( ) ) ;


signature:
public class ManagedReferenceMethodInterceptor { /** * { @ inheritDoc } */
public Object processInvocation ( final InterceptorContext context ) throws Exception { } }

implementation: final ManagedReference reference = ( ManagedReference ) context . getPrivateData ( ComponentInstance . class ) . getInstanceData ( contextKey ) ; final Object instance = reference . getInstance ( ) ; try { return method . invoke ( instance , context . getParameters ( ) ) ; } catch ( IllegalAccessException e ) { final IllegalAccessError n = new IllegalAccessError ( e . getMessage ( ) ) ; n . setStackTrace ( e . getStackTrace ( ) ) ; throw n ; } catch ( InvocationTargetException e ) { throw Interceptors . rethrow ( e . getCause ( ) ) ; }