public List < FunctionWrapper > compileFunctions ( ImportStack importStack , Context context , Object object ) { Class < ? > functionClass = object . getClass ( ) ; Method [ ] methods = functionClass . getDeclaredMethods ( ) ; List < FunctionDeclaration > declarations = new LinkedList <> ( ) ; for ( Method method : methods ) { int modifiers = method . getModifiers ( ) ; if ( ! Modifier . isPublic ( modifiers ) ) { continue ; } FunctionDeclaration declaration = createDeclaration ( importStack , context , object , method ) ; declarations . add ( declaration ) ; } return declarations . stream ( ) . map ( FunctionWrapper :: new ) . collect ( Collectors . toList ( ) ) ; }
Compile methods from an object into libsass functions .