[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15387020#comment-15387020
 ] 

ASF GitHub Bot commented on DELTASPIKE-1185:
--------------------------------------------

Github user johnament commented on a diff in the pull request:

    https://github.com/apache/deltaspike/pull/59#discussion_r71637833
  
    --- Diff: 
deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ParameterUtil.java
 ---
    @@ -0,0 +1,76 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements. See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership. The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License. You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied. See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.deltaspike.core.util;
    +
    +import java.lang.reflect.InvocationTargetException;
    +import java.lang.reflect.Method;
    +
    +import javax.enterprise.inject.Typed;
    +
    +@Typed()
    +public abstract class ParameterUtil
    +{
    +    private static boolean parameterSupported = true;
    +    private static Class<?> parameterClass;
    +    private static Method getNameMethod;
    +    private static Method getParametersMethod;
    +
    +    static
    +    {
    +        try
    +        {
    +            parameterClass = Class.forName("java.lang.reflect.Parameter");
    --- End diff --
    
    This is super useful, we'll be able to start adding named parameter support 
in repos now.


> Allow customization (name, description) of JMX managed methods' parameters
> --------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-1185
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1185
>             Project: DeltaSpike
>          Issue Type: Wish
>          Components: Core
>    Affects Versions: 1.7.0
>            Reporter: Xavier Dury
>            Priority: Trivial
>
> Currently, it is not possible to name or give a description to parameters of 
> {{@JmxManaged}} methods as {{DynamicMBeanWrapper}} uses the simple 
> {{MBeanOperationInfo}} constructor which gives generic names to parameters 
> like p0, p1, p2...
> It would be nice if we could annotate parameters with something like 
> {{@JmxParameter(name = ..., description = ...)}} or - if using java 8 - use 
> the parameter name which is available via reflection.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to