Examples of SourceMethod


Examples of org.aspectj.org.eclipse.jdt.internal.core.SourceMethod

       
        if(foundMethods != null) {
          int len = foundMethods.length;
          if(len == 1) {
            try {
              SourceMethod sourceMethod = (SourceMethod) foundMethods[0];
              parameterNames = ((SourceMethodElementInfo) sourceMethod.getElementInfo()).getArgumentNames();
            } catch (JavaModelException e) {
              // method doesn't exist: ignore
            }
          }
        }
View Full Code Here

Examples of org.eclipse.dltk.internal.core.SourceMethod

        public String getText(Object element)
        {

            if (element instanceof SourceMethod) {

                SourceMethod m = (SourceMethod) element;
                String[] parameters;

                try {
                    parameters = m.getParameterNames();

                    if (parameters != null && parameters.length > 0) {
                        return m.getElementName() + " - " + parameters[0];
                    }

                } catch (ModelException e) {

                    e.printStackTrace();
                }

                return m.getElementName();

            }

            return super.getText(element);
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceMethod

        if(foundMethods != null) {
          int len = foundMethods.length;
          if(len == 1) {
            try {
              SourceMethod sourceMethod = (SourceMethod) foundMethods[0];
              parameterNames = ((SourceMethodElementInfo) sourceMethod.getElementInfo()).getArgumentNames();
            } catch (JavaModelException e) {
              // method doesn't exist: ignore
            }
          }
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceMethod

        if(foundMethods != null) {
          int len = foundMethods.length;
          if(len == 1) {
            try {
              SourceMethod sourceMethod = (SourceMethod) foundMethods[0];
              parameterNames = ((SourceMethodElementInfo) sourceMethod.getElementInfo()).getArgumentNames();
            } catch (JavaModelException e) {
              // method doesn't exist: ignore
            }
          }
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceMethod

        if(foundMethods != null) {
          int len = foundMethods.length;
          if(len == 1) {
            try {
              SourceMethod sourceMethod = (SourceMethod) foundMethods[0];
              parameterNames = ((SourceMethodElementInfo) sourceMethod.getElementInfo()).getArgumentNames();
            } catch (JavaModelException e) {
              // method doesn't exist: ignore
            }
          }
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceMethod

    }
   
    if (fakeMethod != null)
      existingMethods.remove(fakeMethod);
   
    fakeMethod = new SourceMethod(null, methodName, null) {};
   
    existingMethods.add(fakeMethod);
    viewer.refresh();
   
    return fakeMethod;
View Full Code Here

Examples of org.mapstruct.ap.model.source.SourceMethod

         * exists.
         */
        private Assignment resolveViaMethod(Type sourceType, Type targetType, boolean considerBuiltInMethods) {

            // first try to find a matching source method
            SourceMethod matchingSourceMethod = getBestMatch( methods, sourceType, targetType );

            if ( matchingSourceMethod != null ) {
                return getMappingMethodReference( matchingSourceMethod, targetType );
            }

View Full Code Here

Examples of org.mapstruct.ap.model.source.SourceMethod

        for ( SourceMethod method : methods ) {
            if ( !method.overridesMethod() ) {
                continue;
            }

            SourceMethod reverseMappingMethod = getReverseMappingMethod( methods, method );

            boolean hasFactoryMethod = false;
            if ( method.isIterableMapping() ) {

                IterableMappingMethod.Builder builder = new IterableMappingMethod.Builder();
                if ( method.getIterableMapping() == null && reverseMappingMethod != null &&
                    reverseMappingMethod.getIterableMapping() != null ) {
                    method.setIterableMapping( reverseMappingMethod.getIterableMapping() );
                }

                String dateFormat = null;
                List<TypeMirror> qualifiers = null;
                if ( method.getIterableMapping() != null ) {
                    dateFormat = method.getIterableMapping().getDateFormat();
                    qualifiers = method.getIterableMapping().getQualifiers();
                }

                IterableMappingMethod iterableMappingMethod = builder
                    .mappingContext( mappingContext )
                    .method( method )
                    .dateFormat( dateFormat )
                    .qualifiers( qualifiers )
                    .build();

                hasFactoryMethod = iterableMappingMethod.getFactoryMethod() != null;
                mappingMethods.add( iterableMappingMethod );
            }
            else if ( method.isMapMapping() ) {

                MapMappingMethod.Builder builder = new MapMappingMethod.Builder();

                if ( method.getMapMapping() == null && reverseMappingMethod != null &&
                    reverseMappingMethod.getMapMapping() != null ) {
                    method.setMapMapping( reverseMappingMethod.getMapMapping() );
                }
                String keyDateFormat = null;
                String valueDateFormat = null;
                List<TypeMirror> keyQualifiers = null;
                List<TypeMirror> valueQualifiers = null;
View Full Code Here

Examples of org.mapstruct.ap.model.source.SourceMethod

            method.getMappings().putAll( newMappings );
        }
    }

    private SourceMethod getReverseMappingMethod(List<SourceMethod> rawMethods, SourceMethod method) {
        SourceMethod result = null;
        InheritInverseConfigurationPrism reversePrism = InheritInverseConfigurationPrism.getInstanceOn(
            method.getExecutable()
        );

        if ( reversePrism != null ) {
View Full Code Here

Examples of org.mapstruct.ap.model.source.SourceMethod

    private List<SourceMethod> retrieveMethods(TypeElement usedMapper, TypeElement mapperToImplement) {
        List<SourceMethod> methods = new ArrayList<SourceMethod>();

        for ( ExecutableElement executable : methodsIn( allEnclosingElementsIncludeSuper( usedMapper ) ) ) {
            if ( isNotObjectEquals( executable ) && wasNotYetOverridden( methods, executable ) ) {
                SourceMethod method = getMethod( usedMapper, executable, mapperToImplement );
                if ( method != null ) {
                    methods.add( method );
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.