Package java.lang.reflect

Examples of java.lang.reflect.Member


      if ( !isExplicitAttributeAccessAnnotationPlacedCorrectly( annotationTarget, accessType ) ) {
        continue;
      }

      // the placement is correct, get the member
      Member member;
      if ( annotationTarget instanceof MethodInfo ) {
        Method m;
        try {
          m = clazz.getMethod( ( (MethodInfo) annotationTarget ).name() );
        }
View Full Code Here


    else {
      PropertyDescriptorImpl propertyDescriptor = ( PropertyDescriptorImpl ) propertyDescriptors.get(
          metaConstraint.getPropertyName()
      );
      if ( propertyDescriptor == null ) {
        Member member = metaConstraint.getMember();
        propertyDescriptor = addPropertyDescriptorForMember( member, isValidAnnotationPresent( member ) );
      }
      propertyDescriptor.addConstraintDescriptor( metaConstraint.getDescriptor() );
    }
  }
View Full Code Here

                  Class<?> paramClass = new PrimitiveAwareClassLoader(di.getClassLoader()).loadClass(param);
                  methodSignature[paramIndex++] = paramClass;
               }
               if(log.isTraceEnabled())
                  log.trace("Looking for method " + methodName + Arrays.toString(methodSignature) + " on class " + ejbClass);
               Member member = ClassHelper.getPrivateMethod(ejbClass, methodName, methodSignature);
               log.debug("adding " + annotationClass.getName()
                     + " method annotation to " + member);
               annotations.addAnnotation(member, annotationClass, annotation);
               overrideAnnotations(container, member, annotationClass.getName(),
                     annotation);
View Full Code Here

            {
                for(InjectionPoint ip : injections)
                {
                    if(!ip.isDelegate())
                    {
                        Member member = ip.getMember();
                        if(member instanceof Field)
                        {
                            injectField((Field)member  , proxy, cretionalContext);
                        }
                        if(member instanceof Method)
View Full Code Here

        {
            String value = namedQualifier.value();

            if(value == null || value.equals(""))
            {
                Member member = injectionPoint.getMember();
                if(!(member instanceof Field))
                {
                    throw new WebBeansConfigurationException("Injection point type : " + injectionPoint
                                                             + " can not define @Named qualifier without value!");
                }
View Full Code Here

     */
    public static boolean isStaticInjection(InjectionPoint injectionPoint)
    {
        if (injectionPoint != null)
        {
            Member member = injectionPoint.getMember();
            if (member != null && Modifier.isStatic(member.getModifiers()))
            {
                return true;
            }
        }

View Full Code Here

    if ( !( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) ) {
      throw log.getElementTypeHasToBeFieldOrMethodException();
    }

    Member member = null;
    if ( ElementType.FIELD.equals( elementType ) ) {
      member = run( GetDeclaredField.action( clazz, property ) );
    }
    else {
      String methodName = property.substring( 0, 1 ).toUpperCase() + property.substring( 1 );
View Full Code Here

    Set<ConstrainedExecutable> executableMetaData = newHashSet();

    for ( ExecutableElement executable : executableElements ) {
      // HV-172; ignoring synthetic methods (inserted by the compiler), as they can't have any constraints
      // anyway and possibly hide the actual method with the same signature in the built meta model
      Member member = executable.getMember();
      if ( Modifier.isStatic( member.getModifiers() ) || member.isSynthetic() ) {
        continue;
      }

      executableMetaData.add( findExecutableMetaData( executable ) );
    }
View Full Code Here

    @PrivilegedActionPragma
    public final Member asMember() {
        if (javaMemberHolder == null) {
            javaMemberHolder = new VmIsolateLocal<Member>();
        }
        Member javaMember = javaMemberHolder.get();
        if (javaMember == null) {
            //parameter types
            int arg_count = getNoArguments();
            Class[] args = new Class[arg_count];
            for (int i = 0; i < arg_count; i++) {
View Full Code Here

        if (accessible == null) {
            return null;
        }

        if (accessible instanceof Member) {
            Member member = (Member) accessible;

            if (Modifier.isPublic(member.getModifiers()) &&
                Modifier.isPublic(member.getDeclaringClass().getModifiers())) {

                return accessible;
            }
        }
View Full Code Here

TOP

Related Classes of java.lang.reflect.Member

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.